Skip to content

feat(tui): clear the whole composer draft with ctrl+u - #121

Merged
jkyberneees merged 1 commit into
mainfrom
feat/ctrl-u-clear-draft
Sep 13, 2026
Merged

jkyberneees merged 1 commit into
mainfrom
feat/ctrl-u-clear-draft

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Summary

  • Ctrl+U wipes the entire composer draft (readline whole-line kill) — replaces the composer ^U viewport-page case; paging stays on PgUp/PgDn/^D, approval/clarify cards keep their own ^U paging
  • Shift+Delete alias 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 wipe
  • History recall (histDraft) survives the clear; binding sits below the approval/clarify capture rungs so it never fires under a card
  • README key-binding table updated

Tests

RED-first: clear_draft_test.go (clear + history recall, approval-head guard, alias chord, CSI decode matrix incl. shift+3 regression). Full make test -race green, lint 0 issues.

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.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 13, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@jkyberneees
jkyberneees merged commit 30b8167 into main Sep 13, 2026
9 checks passed
@jkyberneees
jkyberneees deleted the feat/ctrl-u-clear-draft branch September 13, 2026 17:36
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