Skip to content

Commit 658eda0

Browse files
Merge pull request #9 from Spacecraft-Software/tui-text-input
feat(vault-tui): readline text-input editing + bracketed paste
2 parents fb3db5c + f154883 commit 658eda0

4 files changed

Lines changed: 551 additions & 41 deletions

File tree

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,30 @@ range may break in any release.
1010

1111
### Added
1212

13+
- **TUI text-input editing — readline keys + bracketed paste (PRD §7.2).** The
14+
`/` search, `:` command line, and every add/edit form field were
15+
append/backspace-only `String`s with no cursor and no paste. They now share a
16+
`TextInput { buf, cursor }` with real line editing:
17+
- Cursor movement ``/``/`Home`/`End` (+ `Ctrl+A`/`Ctrl+E`), `Delete` at the
18+
cursor, and insert anywhere — fix a mid-word typo without deleting back to it.
19+
- Kill/yank into a shared kill-ring: `Ctrl+W` (word back), `Ctrl+U` (to start),
20+
`Ctrl+K` (to end), `Ctrl+Y` (yank).
21+
- **Bracketed paste** (`EnableBracketedPaste` + `Event::Paste`): paste a value
22+
from the system clipboard — including over SSH/tmux — at the cursor;
23+
newlines are stripped (every input is single-line).
24+
- `Ctrl+S` submits the add/edit form (PRD §7.2 *save*). On the form's Type
25+
row ``/``/`Space` still toggle login⇄note; cursor keys edit only in text
26+
fields. The caret renders where edits land (`gi▌t`), not just at the end.
27+
- **`Ctrl+C` remains the global quit** — a deliberate deviation from §7.2's
28+
literal `Ctrl+C`=copy: there's no selection model, and quit-safety/muscle
29+
memory win. Deferred (tracked): selection + `Ctrl+C`/`X`/`V`/`Z`
30+
copy/cut/paste/undo, and reading the agent clipboard back for paste.
31+
- TUI-only — no protocol, agent, CLI, or dependency changes (crossterm 0.28
32+
already exposes the paste API). Tests: `TextInput` units (insert/delete at
33+
cursor, nav clamping, kills return removed text, paste at cursor, UTF-8
34+
boundary safety), kill→yank round-trip, paste-into-focused-field,
35+
search-edit re-anchor, and a mid-string caret `TestBackend` smoke.
36+
1337
- **`vault register` + `vault login` — account profile (PRD §7.1).** The last
1438
two unimplemented verbs, as an account-profile flow (not the Bitwarden
1539
personal API-key model, which stays a tracked follow-up).

0 commit comments

Comments
 (0)