feat(vault): card-cardholder read selector (+ TUI prefill)#33
Merged
Conversation
`vault get <card> --field card-cardholder` returns the cardholder name, and the TUI detail pane gains a `Holder` line — which also lets the TUI card edit form prefill the cardholder (it previously started blank, as there was no read selector). Closes the card edit-prefill gap from the card-write / TUI-card slices. - vault-ipc: `Field::CardCardholder`. - vault-cli: `FieldArg::CardCardholder` (`--field card-cardholder`). - vault-agent: `get_field` decrypts the card and returns `cardholder_name`. - vault-tui: `ensure_detail` fetches a `Holder` line for cards; `new_edit` prefills `F_CARDHOLDER` from it. - docs: README selector list, CHANGELOG; TUI card-edit test now asserts the cardholder prefills. 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
Adds a
card-cardholderfield selector:vault get <card> --field card-cardholderreturns the cardholder name, and the TUI detail pane shows aHolderline. That detail line also lets the TUI card edit form prefill the cardholder, which previously started blank because there was no read selector — closing the card edit-prefill gap noted across PRs #25/#26/#28.How (mirrors the existing card selectors)
Field::CardCardholder.FieldArg::CardCardholder→--field card-cardholder(clap-derived).get_fielddecrypts the card (DecryptOptions { card: true }) and returnscardholder_name.ensure_detailadds("Holder", Field::CardCardholder)to the card specs;new_editprefillsF_CARDHOLDERfrom theHolderline.Tests
The TUI card-edit test now seeds a
Holderdetail line and asserts the cardholder row prefills. Core already covers cardholder decrypt; the proto/CLI mapping is compiler-exhaustive.Verification
fmt --check, fresh-isolatedclippy --all-features -D warnings,cargo test --workspace --all-targets,cargo deny check, both headless builds — all green.🤖 Generated with Claude Code