feat(vault-tui): per-field reveal/copy in the detail pane (+ card CVV)#35
Merged
Conversation
The detail pane is now focusable (Tab cycles folders → items → detail). With it focused, j/k move a field cursor and Space/c reveal/copy the selected field — so the card CVV (and any non-primary field) can finally be revealed and copied, not just the item's primary field. - app.rs: `Focus::Detail`; `App.detail_field` cursor; a `DetailField` table via `detail_fields(cipher_type)` (card/identity only — logins keep c/u/o/t); move_*/focus_next gain Detail arms; the cursor resets when the item selection changes; `selected_detail_field`/`detail_focused` helpers. - main.rs: `toggle_reveal`/`c` act on the cursor-selected field when the detail pane is focused (masked fields fetch on demand, like the password path — now covering the CVV); item-focus behavior unchanged. `ensure_detail`/`copy_field` accept detail focus. - ui.rs: `render_detail` iterates `detail_fields` for card/identity with a cursor highlight; the pane border highlights when focused. - Tests: `detail_fields` per type, cursor nav/clamp, cursor reset on item change, 3-way focus cycle. - 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
Makes the TUI detail pane focusable and per-field navigable.
Tabnow cycles folders → items → detail; with the detail pane focused,j/kmove a field cursor andSpace/creveal/copy the selected field. This closes the gap where the card CVV (and any non-primary field) couldn't be revealed or copied — previouslySpace/conly hit the item's primary field.Bounded scope (the chosen option): reuses the fields already shown + the masked CVV; no
Field-enum expansion for the long-tail identity fields (a tracked follow-up).How (
crates/vault-tui/only)app.rs—Focus::Detail; anApp.detail_fieldcursor; aDetailFieldtable viadetail_fields(cipher_type)(card: Holder/Brand/Number*/Exp/CVV*; identity: Person/Email/Phone/Address;*= masked). Logins are intentionally excluded (they already havec/u/o/t+Space).move_*/focus_nextgainDetailarms; the cursor resets when the item selection changes;selected_detail_field/detail_focusedhelpers.main.rs—toggle_reveal(Space) andcact on the cursor-selected field when the detail pane is focused; masked fields (number/CVV) fetch on demand, exactly like the password path. Item-listSpace/cbehavior is unchanged.ensure_detail/copy_fieldnow also accept detail focus.ui.rs—render_detailiteratesdetail_fieldsfor card/identity with a cursor highlight (▸+ amber), and the pane border highlights when focused.Tests
detail_fieldsper type (card includes the maskedCVV/CardCode), cursor navigation/clamping, cursor reset on item-selection change, and the 3-way focus cycle. The existingrender_detailUI tests (card masks number, identity shows contacts) still pass after the rewrite.Verification
fmt --check, fresh-isolatedclippy --all-features -D warnings,cargo test --workspace --all-targets,cargo deny check, both headless builds — all green.Manual: select a card →
Tabto the detail pane →j/ktoCVV→Spacereveals it (re-masks on move),ccopies it. Item-focusedSpace/cstill hit the primary field.Out of scope (tracked follow-up)
Long-tail identity granular
Fieldselectors (first/middle/last/company/ssn/passport/license/address parts) — a separate, selector-heavy slice.🤖 Generated with Claude Code