Commit a1eeff9
## Description
Adds familiar Cmd-based editing shortcuts to the shared TUI editor
binding set, covering both the agent input and reusable TUI editor
surfaces without changing any existing binding:
- Cmd+A/C/V/X/Z and Cmd+Shift+Z for select all, copy, OS-clipboard
paste, cut, undo, and redo.
- Cmd+Left/Right and Cmd+Shift+Left/Right for visual-line movement and
selection.
- Cmd+Backspace for delete-to-line-start.
- A TUI-specific binding-validator allowance so Super/Cmd chords work on
every OS where enhanced terminal keyboard reporting provides them,
without changing GUI validation or behavior.
Cmd+Delete remains intentionally unbound because terminal input cannot
represent it portably (an existing regression test enforces this). The
optional buffer-top/bottom and clear-lines chords remain out of scope
because the shared TUI editor has no corresponding commands. No proposed
must-have chord collided with an existing TUI binding; all legacy
Ctrl/Alt/Home/End bindings remain registered.
Originating thread:
https://warpdev.slack.com/archives/C0BDQDW8V5E/p1785370335034379
## Linked Issue
- [x]
[APP-5057](https://linear.app/warpdotdev/issue/APP-5057/tui-editor-add-gui-editor-cmd-based-hotkeys-cmdacvxz-etc-now-that-tui)
- [x] The ticket is gated for this spec-skipped implementation.
- [x] Visual proof is included below.
## Testing
- Fail-before: `shared_editor_registers_additive_cmd_bindings` failed
because `cmd-a` was absent.
- Focused regression suite: 5/5 passed (binding registration, paste
insertion/empty/dispatch, and line selection).
- `env -u WARP_API_KEY CARGO_BUILD_JOBS=2 cargo nextest run -p
warp_tui`: 852/852 passed after merging current `master`.
- `CARGO_INCREMENTAL=0 cargo clippy -p warp_tui --all-targets --tests --
-D warnings`: passed after merging current `master`.
- `CARGO_BUILD_JOBS=2 cargo build -p warp_tui --bin warp-tui-oss`:
passed.
- `./script/format` and `git diff --check`: passed.
- `./script/presubmit`: formatting and all documented Clippy phases
passed; the workspace test phase could not complete in this cloud runner
because unrelated environment tests failed (root-only sudo expectation,
external harness HTTP 501 responses, and missing XDG runtime), after an
initial run also exhausted the sandbox build-artifact quota. The
touched-crate suite above passed independently.
- Live authenticated TUI: enhanced-keyboard Cmd+A selected `cmd hotkey
roundtrip`, Cmd+X cut it to the OS clipboard, and Cmd+V restored it; the
recording also exercises Cmd+Z and Cmd+Shift+Z.
- [x] I manually tested the running TUI with `warp-tui-oss`.
### Screenshots / Videos
[View the implementation run, screenshot, and video
artifacts](https://staging.warp.dev/conversation/8b718d0c-e590-4397-9bc6-b24c01883f34).
## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
CHANGELOG-IMPROVEMENT: Added familiar Cmd-based editing shortcuts to
Warp Agent CLI input.
Co-Authored-By: Warp <agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
### Rework changes
- Added `cmd_bindings_dispatch_expected_editor_commands`, which
dispatches Cmd+A/C/V/X/Z and Cmd+Shift+Z through the registered keymap
and verifies that each chord produces its intended `TuiEditorCommand`.
- The standalone Cmd+C visual-proof finding was explicitly waived by the
requester in the originating Slack thread; the existing proof is
unchanged.
- Revalidated with `./script/format`, focused Clippy, and all 852
`warp_tui` tests after merging the current `master`.
<!-- factory-agent:
{"source":"factory-agent","task_id":"APP-5057","task_source":"linear","task_url":"https://linear.app/warpdotdev/issue/APP-5057/tui-editor-add-gui-editor-cmd-based-hotkeys-cmdacvxz-etc-now-that-tui","linear_issue_id":"APP-5057","oz_run_id":"019fb066-9291-7c2c-80f7-d4736ecfbf7f","repo":"warpdotdev/warp","review_rework_attempts":1}
-->
---------
Co-authored-by: Oz <oz-agent@warp.dev>
Co-authored-by: Warp <agent@warp.dev>
Co-authored-by: harryalbert <harryalbert364@gmail.com>
1 parent 6de2388 commit a1eeff9
7 files changed
Lines changed: 427 additions & 21 deletions
File tree
- crates/warp_tui/src
- input
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
93 | 107 | | |
94 | 108 | | |
95 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| 126 | + | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| |||
236 | 241 | | |
237 | 242 | | |
238 | 243 | | |
239 | | - | |
| 244 | + | |
240 | 245 | | |
241 | 246 | | |
242 | 247 | | |
243 | 248 | | |
244 | 249 | | |
245 | 250 | | |
246 | | - | |
| 251 | + | |
247 | 252 | | |
248 | 253 | | |
249 | 254 | | |
| |||
287 | 292 | | |
288 | 293 | | |
289 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
290 | 309 | | |
291 | 310 | | |
292 | 311 | | |
293 | 312 | | |
294 | 313 | | |
295 | | - | |
| 314 | + | |
296 | 315 | | |
297 | 316 | | |
298 | 317 | | |
299 | 318 | | |
300 | 319 | | |
301 | 320 | | |
302 | | - | |
| 321 | + | |
303 | 322 | | |
304 | 323 | | |
305 | 324 | | |
306 | 325 | | |
307 | 326 | | |
308 | 327 | | |
309 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
310 | 336 | | |
311 | 337 | | |
312 | 338 | | |
| |||
320 | 346 | | |
321 | 347 | | |
322 | 348 | | |
323 | | - | |
| 349 | + | |
324 | 350 | | |
325 | 351 | | |
326 | 352 | | |
| |||
334 | 360 | | |
335 | 361 | | |
336 | 362 | | |
337 | | - | |
| 363 | + | |
338 | 364 | | |
339 | 365 | | |
340 | 366 | | |
341 | 367 | | |
342 | 368 | | |
343 | 369 | | |
344 | | - | |
| 370 | + | |
345 | 371 | | |
346 | 372 | | |
347 | 373 | | |
| |||
478 | 504 | | |
479 | 505 | | |
480 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
481 | 513 | | |
482 | 514 | | |
483 | 515 | | |
| |||
487 | 519 | | |
488 | 520 | | |
489 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
490 | 525 | | |
491 | 526 | | |
492 | 527 | | |
| |||
559 | 594 | | |
560 | 595 | | |
561 | 596 | | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
562 | 635 | | |
563 | 636 | | |
564 | 637 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
241 | 247 | | |
242 | 248 | | |
243 | 249 | | |
| |||
0 commit comments