feat(tui): clear the whole composer draft with ctrl+u - #121
Merged
Merged
Conversation
Ctrl+U is the readline whole-line kill and reaches every terminal identically, so it replaces the composer ^U viewport-page case (paging stays on PgUp/PgDn/^D; approval and clarify cards keep their own ^U paging). Shift+Delete is accepted as an alias only where an enhanced-key chord decodes (kitty CSI-u / modifyOtherKeys shift form of key code 3 — its ETX/ctrl+c meaning is preserved for plain and ctrl forms, and code 51 stays the digit '3'), so degraded terminals degrade to plain single-char Delete instead of a wrong whole-draft wipe. History recall (histDraft) survives the clear; the binding lives below the approval and clarify capture rungs, so it never fires under a card.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bodek | 3126986 | Commit Preview URL Branch Preview URL |
Sep 13 2026, 05:34 PM |
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
Ctrl+Uwipes the entire composer draft (readline whole-line kill) — replaces the composer^Uviewport-page case; paging stays on PgUp/PgDn/^D, approval/clarify cards keep their own^UpagingShift+Deletealias only where an enhanced-key chord decodes (kitty CSI-u / modifyOtherKeys shift form of key code 3). Key code 51 stays the digit '3' (shift+3 keeps its unmapped sentinel), key code 3 keeps its ETX/ctrl+c meaning for plain/ctrl forms — degraded terminals degrade to plain single-char Delete, never a wrong wipehistDraft) survives the clear; binding sits below the approval/clarify capture rungs so it never fires under a cardTests
RED-first:
clear_draft_test.go(clear + history recall, approval-head guard, alias chord, CSI decode matrix incl. shift+3 regression). Fullmake test -racegreen, lint 0 issues.