feat: add group field to Entry and ManifestEntry

Add optional group: Option<String> to both Entry and ManifestEntry for
logical organization (e.g. "work", "personal"). Backwards-compatible via
skip_serializing_if so existing vaults deserialize with group: None.
Includes three new tests verifying round-trip and legacy deserialization.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-12 09:25:18 -04:00
parent c7aab28484
commit 7baec1cd67
4 changed files with 75 additions and 0 deletions

View File

@@ -457,6 +457,7 @@ fn cmd_add() -> Result<()> {
password,
notes,
totp_secret,
group: None,
created_at: now.clone(),
updated_at: now.clone(),
};
@@ -476,6 +477,7 @@ fn cmd_add() -> Result<()> {
name: name.clone(),
url,
username,
group: None,
updated_at: now,
},
);
@@ -660,6 +662,7 @@ fn cmd_edit(query: String) -> Result<()> {
password,
notes,
totp_secret,
group: entry.group,
created_at: entry.created_at,
updated_at: now.clone(),
};
@@ -678,6 +681,7 @@ fn cmd_edit(query: String) -> Result<()> {
name: name.clone(),
url,
username,
group: None,
updated_at: now,
},
);