Skip to content

Commit 05c8cc6

Browse files
Merge pull request #26 from Spacecraft-Software/tui-card-write
feat(vault-tui): create/edit cards in the add/edit form
2 parents 986670e + ab64bca commit 05c8cc6

4 files changed

Lines changed: 302 additions & 37 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ range may break in any release.
1010

1111
### Added
1212

13+
- **TUI card create/edit.** The `vault-tui` add/edit form (`a`/`e`) now composes
14+
card (type 3) items, not just logins and secure notes. The **Type** row cycles
15+
`login → secure note → card`; the card rows are cardholder/brand/number/expiry
16+
(one `MM/YYYY` field, split on submit)/CVV, with number and CVV masked while
17+
unfocused. On edit, brand/expiry prefill from the detail pane's on-select fetch
18+
and secrets start blank (blank = leave unchanged). Builds the existing
19+
`CardWrite` payload on `Request::Add`/`Edit` — no backend change. Identity TUI
20+
editing stays pending (no identity write path yet). Tests: card add carries
21+
split expiry + redacts secrets, card edit prefill/diff, `parse_expiry`.
22+
1323
- **Create/edit card ciphers.** `vault add … --type card` and `vault edit`
1424
now build/update card (type 3) items: cardholder/brand/expiry via flags, the
1525
**number and CVV prompted on the controlling terminal** (`/dev/tty`, never

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ vault edit "My Visa" --expiry 05/2031 --code # --code re-prompts the CVV
113113
(identities are read-only for now). Editing card fields on a non-card item is
114114
rejected.
115115

116+
The TUI can also create and edit cards: press `a` and cycle the **Type** row
117+
with `Space` (`login → secure note → card`), or `e` on a selected card. The
118+
card's number and CVV mask while unfocused; on edit they start blank (blank =
119+
leave unchanged), and the brand/expiry prefill from the detail pane.
120+
116121
### PIN unlock
117122

118123
For quick access without re-typing the master password, enroll a PIN (after an

0 commit comments

Comments
 (0)