Skip to content

feat(vault): M5 slice 3 — TUI search, generator overlay, command line#2

Merged
UnbreakableMJ merged 1 commit into
mainfrom
m5-slice3-tui-search-generate
Jun 12, 2026
Merged

feat(vault): M5 slice 3 — TUI search, generator overlay, command line#2
UnbreakableMJ merged 1 commit into
mainfrom
m5-slice3-tui-search-generate

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

Stacked on #1 — base is m5-slice2-tui-reveal-copy so only slice 3's diff shows here. GitHub will retarget this PR to main automatically when #1 merges.

Summary

Makes the three previewed TUI keys live: / search, g generate, : 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 item name + username, composed on top of the active 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 (g)

  • Centered overlay driven by vault-core's generate_password (same engine as vault generate): g/r regenerate, +/- 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 — Request::CopyText

  • New 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 already does) and reuses slice 2's 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; unknown commands toast 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.

Supply-chain

No new dependencies — cargo deny unchanged.

🤖 Generated with Claude Code

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>
@UnbreakableMJ UnbreakableMJ changed the base branch from m5-slice2-tui-reveal-copy to main June 12, 2026 08:53
@UnbreakableMJ UnbreakableMJ reopened this Jun 12, 2026
@UnbreakableMJ UnbreakableMJ merged commit 959616d into main Jun 12, 2026
7 checks passed
@UnbreakableMJ UnbreakableMJ deleted the m5-slice3-tui-search-generate branch June 12, 2026 09:09
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