Skip to content

feat(vault-tui): scrollable add/edit form + full identity field set#34

Merged
UnbreakableMJ merged 1 commit into
mainfrom
tui-form-scroll
Jun 16, 2026
Merged

feat(vault-tui): scrollable add/edit form + full identity field set#34
UnbreakableMJ merged 1 commit into
mainfrom
tui-form-scroll

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

What

The TUI add/edit form overlay now scrolls, which retires the curated-10 identity limit from PR #28: the TUI identity form now edits the full 18-field set, including the SSN/passport/license secrets. Pure vault-tui — the IdentityWrite backend already carried every field.

How

  • ui.rs::render_form — renders the bordered block, then splits its inner area into a scrollable rows body + a fixed 1-line footer (keybinds stay put; a cue appears when the list overflows). A new pure scroll_offset(focused, height) keeps the focused row visible, so the renderer stays stateless.
  • app.rs — identity visible_fields is the full ordered set; blank_fields gains Middle/IdUser/Company/SSN/Passport/License/Addr2/Addr3 (SSN/Passport/License are secret: true → masked while unfocused, like the card number/CVV); IdentityFields grows the 8 fields with a hand-written redacting Debug (the 3 secrets must not leak through FormSubmit's Debug); submit/any_set updated.
  • main.rs — the IdentityWrite mapping now carries all 18 fields; secrets via String::into_bytes.

Tests

Full-field identity add (asserts SSN rides + is redacted in FormSubmit Debug), edit prefill walks to City at its new index, and scroll_offset (no scroll until focus passes the bottom; degenerate heights don't panic).

Verification

fmt --check, fresh-isolated clippy --all-features -D warnings, cargo test --workspace --all-targets, cargo deny check, both headless builds — all green.

Manual: in a short terminal, a → cycle to identity → Tab past the bottom → the form scrolls and the footer stays fixed; SSN/passport/license mask when unfocused.

Out of scope (tracked follow-up)

Per-field TUI reveal/copy for the long-tail identity fields + card CVV.

🤖 Generated with Claude Code

The form overlay now scrolls, retiring the curated-10 identity limit:
the TUI identity form edits the full 18-field set, incl. the
SSN/passport/license secrets.

- ui.rs: render_form splits the overlay into a scrollable rows body +
  a fixed keybind footer (a `↕` cue when the list overflows). A new
  pure `scroll_offset(focused, height)` (app.rs) keeps the focused row
  visible; the renderer stays stateless.
- app.rs: identity `visible_fields` is now the full ordered set;
  `blank_fields` gains Middle/IdUser/Company/SSN/Passport/License/
  Addr2/Addr3 (SSN/Passport/License masked); `IdentityFields` grows the
  8 fields with a hand-written redacting Debug (the 3 secrets);
  `submit` + `any_set` updated.
- main.rs: the IdentityWrite mapping carries all 18 fields (secrets via
  String::into_bytes). No backend change.
- Tests: full-field identity add + Debug redaction, edit prefill at the
  new row index, `scroll_offset`.
- docs: README, CHANGELOG.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@UnbreakableMJ
UnbreakableMJ merged commit f5c6a1f into main Jun 16, 2026
8 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the tui-form-scroll branch June 16, 2026 12:58
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