fix(tui): restore cleared composer with Ctrl+Z#1911
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to undo the clearing of the composer text in the TUI. It adds a clear_undo_buffer to the ComposerState and maps Ctrl-z to restore the last cleared non-empty input if the current composer is empty. Feedback suggests refining the empty-check logic to use trim().is_empty() to prevent whitespace-only strings from overwriting or being restored from the undo buffer.
168fa9a to
03cbb8d
Compare
|
Thanks for the review. The whitespace-only cases are covered in this branch now: recoverable clears only stash drafts when \ rim().is_empty()\ is false, restores filter out whitespace-only drafts, and \whitespace_recoverable_clear_does_not_overwrite_undo_buffer\ covers the regression. I re-ran the focused composer undo tests locally and they pass. |
- grep_files now respects cancellation token (Hmbown#1839, thanks @LING71671) - Ctrl+Z restores last cleared composer draft (Hmbown#1911, thanks @LING71671) - Clipboard works on non-wlroots Wayland via wl-copy (Hmbown#1938, thanks @ousamabenyounes)
…c, receipt truncation fix - SWE-bench: codewhale swebench run/export writes prediction JSONL from working-tree diff, with untracked-file inclusion via git add -N - CLI: --workspace / -C global flag forwards to TUI for file ops - CLI: codewhale exec --auto semantics clarified in help text - Markdown: table pipes inside inline code no longer create phantom columns (split_table_cells with backtick-awareness) - Receipt: floor_char_boundary prevents multibyte UTF-8 slice panic - Contributors: Ling (LING71671 Hmbown#1839 Hmbown#1911), Ben Younes (ousamabenyounes Hmbown#1938), jeoor npm fix (Hmbown#1860) credited across all 3 READMEs - ja-JP README: 19 contributors synced to parity with EN/zh-CN (80 each) - Docs: SWEBENCH.md, RECURSIVE_SELF_IMPROVEMENT.md, MODES.md exec clarification - Sub-agent footer: Alt+V hint now says 'details' not 'raw'
|
Thanks @LING71671 — this landed in #1988 and is on main via commit 8878ac0. The shipped change adds the clear undo buffer, Ctrl+Z restore path, and the focused composer regression tests around recoverable clears.\n\nI am closing this PR now that the code is on main. The release notes and README Thanks list both credit you for #1911. Apologies that the harvest commit missed the exact 'Harvested from PR #1911 by @LING71671' trailer, which is why the auto-close workflow did not close this at merge time. |
Summary
Closes #1771
Validation