feat(vault-tui): scrollable add/edit form + full identity field set#34
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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— theIdentityWritebackend 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 purescroll_offset(focused, height)keeps the focused row visible, so the renderer stays stateless.app.rs— identityvisible_fieldsis the full ordered set;blank_fieldsgainsMiddle/IdUser/Company/SSN/Passport/License/Addr2/Addr3(SSN/Passport/License aresecret: true→ masked while unfocused, like the card number/CVV);IdentityFieldsgrows the 8 fields with a hand-written redactingDebug(the 3 secrets must not leak throughFormSubmit's Debug);submit/any_setupdated.main.rs— theIdentityWritemapping now carries all 18 fields; secrets viaString::into_bytes.Tests
Full-field identity add (asserts SSN rides + is redacted in
FormSubmitDebug), edit prefill walks to City at its new index, andscroll_offset(no scroll until focus passes the bottom; degenerate heights don't panic).Verification
fmt --check, fresh-isolatedclippy --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 →Tabpast 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