feat(vault): M5 slice 3 — TUI search, generator overlay, command line#2
Merged
Merged
Conversation
Make the three previewed keys live: `/` filters the item list as you
type, `g` opens a password-generator overlay, and `:` opens a vim-style
command line. Input is now routed through an InputMode (Normal / Search /
Command / Generate) so each surface owns its keys.
Search: live case-insensitive substring match on name + username,
composed on top of the folder filter. Enter accepts (query persists,
surfaced in the `Items (n) /query` pane title), Esc in search mode drops
the query, Esc in normal mode peels an active filter back before
quitting. Every query edit re-anchors the selection and re-masks any
revealed secret; arrows still move the selection mid-search.
Generator: centered overlay over the browser driven by vault-core's
generate_password (same engine as `vault generate`). g/r regenerate,
+/- adjust length (clamped 8–128, Bitwarden's ceiling), s toggles
symbols, c copies, Esc closes. The password is held in a GeneratorState
(zeroised on drop, Debug-redacted).
Protocol: new Request::CopyText { text, clear_after_secs } carries the
generated password to the agent's clipboard — the value rides the local
UDS once (exactly like Unlock's password) and reuses the existing
clipboard_set + 30s auto-clear machinery. Requires an unlocked agent;
headless --no-default-features builds decline it cleanly.
Command line: tiny vocabulary — q/quit, r/refresh, sync, lock — with
unknown commands toasting the list. The status bar echoes the line being
edited (/query▌ / :cmd▌) ahead of toasts and hints.
Tests: search/compose/re-anchor, command-buffer, and generator units
(defaults, regenerate, clamp, symbols, Debug-redaction) plus TestBackend
smokes for the query title/status echo, command echo, and the overlay;
the agent's locked-session test now covers CopyText-while-locked. No new
dependencies.
Co-Authored-By: Claude Fable 5 <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.
Summary
Makes the three previewed TUI keys live:
/search,ggenerate,:command line. Input is now routed through anInputMode(Normal / Search / Command / Generate) so each surface owns its keys.Search (
/)Items (n) /querypane title); Esc in search mode drops the query; Esc in normal mode peels an active filter back before quitting.Generator (
g)vault-core'sgenerate_password(same engine asvault generate):g/rregenerate,+/-length (clamped 8–128, Bitwarden's ceiling),stoggles symbols,ccopies,Esccloses.GeneratorState— zeroised on drop,Debug-redacted.Protocol —
Request::CopyTextCopyText { text, clear_after_secs }carries the generated password to the agent's clipboard: the value rides the local UDS once (exactly likeUnlock's password already does) and reuses slice 2'sclipboard_set+ 30s auto-clear machinery.--no-default-featuresbuilds decline it cleanly.Command line (
:)q/quit,r/refresh,sync,lock; unknown commands toast the list./query▌/:cmd▌) ahead of toasts and hints.Tests
Search/compose/re-anchor, command-buffer, and generator units (defaults, regenerate, clamp, symbols,
Debug-redaction) plusTestBackendsmokes for the query title/status echo, command echo, and the overlay; the agent's locked-session test now coversCopyText-while-locked.Supply-chain
No new dependencies —
cargo denyunchanged.🤖 Generated with Claude Code