Skip to content

feat(vault-tui): card/identity detail render (+ reveal/copy)#24

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

feat(vault-tui): card/identity detail render (+ reveal/copy)#24
UnbreakableMJ merged 1 commit into
mainfrom
tui-card-identity

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

What

Completes card/identity support in the TUI (CLI landed in PR #23). Selecting a
card or identity now shows its fields in the detail pane:

  • card: brand / expiry, the number masked (Space reveals it, re-masked
    on navigation away), and a masked CVV.
  • identity: name / email / phone / address.
  • c copies the primary field per type — card → number, identity → email
    (login → password, unchanged); Space reveals the primary secret (card
    number / login password).

Security stays consistent with logins: the non-sensitive fields are fetched on
select, but the card number/CVV are fetched only on reveal — no card secret
enters the TUI process until you ask.

How

No proto/agent/core change — reuses the PR #23 Field selectors + Request::Get.

  • app.rs: DetailView + App.detail (per-id cache of the fetched
    non-sensitive fields); pure primary_secret_field / primary_copy_field
    (type → field) driving Space/c.
  • main.rs: ensure_detail (run-loop, before draw; fetches on selection
    change, cheap no-op otherwise) + a fetch_field helper that skips
    NoSuchField; toggle_reveal and the c binding made type-aware.
  • ui.rs: render_detail branches for card / identity (login unchanged).

Tests

  • app.rs: primary_secret_field/primary_copy_field per cipher type.
  • ui.rs TestBackend: card detail shows brand/expiry + masked number (raw
    number absent until a RevealedSecret is set, then present) + masked CVV;
    identity shows email/phone.

Local CI-exact gates all green: fmt, fresh isolated clippy -D warnings,
cargo test --workspace --all-targets under RUSTFLAGS=-D warnings,
cargo deny check (no new deps), both headless builds.

🤖 Generated with Claude Code

Complete card/identity support in the TUI. Selecting a card/identity fetches
its non-sensitive fields on-select via the existing Request::Get and renders
them in the detail pane; the card number/CVV stay masked and the number is
fetched only on reveal (Space) — like passwords, so no card secret enters the
TUI until asked.

- app.rs: DetailView + App.detail cache; primary_secret_field /
  primary_copy_field (type-aware Space/c).
- main.rs: ensure_detail (fetch on select, cached per id) in the run loop;
  toggle_reveal + the `c` key now use the per-type primary field.
- ui.rs: render_detail branches for card (brand/exp + masked number/CVV) and
  identity (name/email/phone/address).

No proto/agent/core change (reuses the PR #23 Field selectors). Card/identity
is now end-to-end (CLI + TUI).

Tests: primary_*_field units; TestBackend renders for card (masked + revealed
number) and identity contact fields.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@UnbreakableMJ
UnbreakableMJ merged commit 4818e97 into main Jun 15, 2026
8 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the tui-card-identity branch June 15, 2026 20:45
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