Skip to content

feat(desktop): answer the send-while-streaming choice from the keyboard - #1600

Merged
huichen merged 2 commits into
mainfrom
pr/huichen
Nov 13, 2026
Merged

huichen merged 2 commits into
mainfrom
pr/huichen

Conversation

@huichen

@huichen huichen commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

While a reply streams, the desktop send button stops being a plain Stop: pressing it asks whether this send should hold the draft in the queue or interrupt the run and send now. Those two rows could only be picked with a pointer, even though the reader has just pressed Enter in the composer — the keyboard is where their hand already is. This adds a keyboard path through that choice without taking the caret out of the draft.

The menu keeps the caret in the editor and listens on the window in the capture phase, so ↑/↓ walk the rows and Enter confirms, instead of the editor recalling sent messages or sending the draft underneath the open menu. Opening selects the first (reversible) row, so the same Enter that opened the menu lands on the choice that spends nothing and loses nothing. Modified chords (⇧/⌘/⌥/⌃) and IME composition are left to the editor.

Commits

  • feat(desktop): answer the send-while-streaming choice from the keyboard

Verification

Local, at ceb1e8ace in a detached worktree, ulimit -n 8192, node_modules linked from the main checkout:

  • npx tsc --noEmit (desktop) — clean
  • npx eslint on the four changed sources — clean
  • npx vitest run (desktop, full) — 426 files, 6027 tests passed
  • make check-docs — 417 docs checked, placement/bilingual pairing/links OK; provider matrix unchanged

User-visible changes

  • Desktop composer, send button while a reply streams: the queue/interrupt menu can now be answered from the keyboard — ↑/↓ move the highlight, Enter runs the highlighted row, the first row (queue the draft) is selected on open. Before: pointer only, the keyboard pressed the send button and then had no way to choose. Revert: bbf63003f.
  • No migration, no default or setting change, no permission/privacy change.

Notes

None.

The send button asks whether to queue the draft or interrupt the run while a
reply streams, but the two rows could only be picked with a pointer - the
reader had just pressed Enter in the field, so the keyboard was where their
hand already was.

The menu now keeps the caret in the field and listens on the window in the
capture phase: up/down walk the two rows, Enter runs the highlighted
one, and the first row (the queue, which spends and loses nothing) is
selected when the menu opens, so the Enter that asked is the Enter that
answers. Taking the keys before the editor is what keeps one press from both
picking a row and recalling a sent message or sending the draft; a modified
key stays a text-editing gesture. The rows moved into their own component
(SendChoiceMenu) so that wiring does not live in the composer's control row.
@huichen
huichen enabled auto-merge (squash) November 13, 2026 12:17
@huichen
huichen merged commit 3f9a801 into main Nov 13, 2026
10 checks passed
@huichen
huichen deleted the pr/huichen branch November 13, 2026 12:24
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