Skip to content

feat(vault-tui): create/edit identities in the add/edit form (curated)#28

Merged
UnbreakableMJ merged 1 commit into
mainfrom
tui-identity-write
Jun 15, 2026
Merged

feat(vault-tui): create/edit identities in the add/edit form (curated)#28
UnbreakableMJ merged 1 commit into
mainfrom
tui-identity-write

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

What

The TUI's a/e form now creates and edits identity (type 4) ciphers — the Type row cycles login → secure note → card → identity. With this, all four cipher types are editable from both front-ends (CLI + TUI).

No backend change — it builds the IdentityWrite payload that already rides Request::Add/Edit (PR #27).

Scope: curated, no scroll

The form overlay (render_form) renders all rows into one non-scrolling Paragraph. Identity's full 18 fields would overflow it, so the form edits a curated 10-field subset (title, first/last name, email, phone, address1, city, state, postal code, country). The long-tail fields (middle name, identity-username, company, address2/3) and the three secrets (SSN/passport/license) stay CLI-only.

How (crates/vault-tui/ only)

  • app.rsF_TITLE..F_COUNTRY rows; visible_fields/blank_fields grow the identity subset; toggle_type cycles through type 4; type_label"identity". New FormSubmit.identity (IdentityFields, all non-secret). submit() takes the curated fields and folds them into the edit "no changes" gate. new_edit prefills email/phone from the detail pane — the pane's Person/Address are composites that can't be split back, so the rest start blank = leave-unchanged.
  • main.rssubmit_form builds IdentityWrite when the type is identity and threads it into both Request::Add and Request::Edit.

Tests

  • identity add carries the curated fields
  • identity edit prefills email/phone and diffs only the changed city
  • updated type_toggle_swaps_visible_fields_preserving_values for the 4-way cycle

cargo fmt --check, fresh-isolated clippy -D warnings, cargo test --workspace --all-targets (71 TUI tests), cargo deny check, and both headless builds all clean.

Out of scope (tracked follow-ups)

  • Long-tail identity fields + the SSN/passport/license secrets in the TUI — needs form scrolling and/or per-field identity read selectors for prefill.
  • A Field::CardCardholder read selector; per-field TUI reveal/copy for long-tail fields + card CVV.

🤖 Generated with Claude Code

The TUI `a`/`e` form now composes identity (type 4) ciphers — the Type
row cycles login → secure note → card → identity. No backend change: it
builds the `IdentityWrite` payload that already rides Request::Add/Edit
(CLI write path, PR #27).

To fit the non-scrolling overlay the form edits a curated 10-field subset
(title, first/last name, email, phone, address1, city, state, postal,
country); the long-tail fields and the SSN/passport/license secrets stay
CLI-only.

- app.rs: F_TITLE..F_COUNTRY rows; visible_fields/blank_fields grow the
  identity subset; toggle_type cycles through type 4; type_label "identity";
  new FormSubmit.identity (IdentityFields, all non-secret); submit() takes
  the curated fields and folds them into the edit "no changes" gate;
  new_edit prefills email/phone from the detail pane (Person/Address are
  composites that can't be split back, so the rest start blank).
- main.rs: submit_form builds IdentityWrite when the type is identity and
  threads it into both Add and Edit.
- Tests: identity add carries the curated fields, identity edit
  prefill/diff; updated the type-toggle test for the 4-way cycle.
- docs: README TUI note, CHANGELOG entry.

All four cipher types are now editable from both front-ends.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@UnbreakableMJ
UnbreakableMJ merged commit 07fca3c into main Jun 15, 2026
8 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the tui-identity-write branch June 15, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant