Skip to content

Separate native chat draft and queued-card shortcuts - #28634

Closed
brennanb2025 wants to merge 3 commits into
mainfrom
brennanb2025/queue-steer-keys
Closed

brennanb2025 wants to merge 3 commits into
mainfrom
brennanb2025/queue-steer-keys

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​159 $\color{#cf222e}{\Huge{\mathbf{−}}}$​153 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6
Prod 28 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​218 $\color{#cf222e}{\Huge{\mathbf{−}}}$​159 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​59

ELI5

With queueing enabled, Cmd/Ctrl+Enter currently treats a typed draft like Enter, but an empty composer sends the newest queued card. The same key changes targets as the draft clears, and the queue setting reads as an on/off switch.

This gives drafts and queued cards separate shortcuts. Enter follows a Queue / Steer choice; Cmd/Ctrl+Enter uses the opposite choice for a typed draft while the agent works. Cmd/Ctrl+Shift+Enter sends the first waiting card and keeps unfinished typing. Empty Cmd/Ctrl+Enter does nothing. During Stopping, both draft keys follow Enter.

The queue capability stays off. A separate switch-on PR will enable queueing.

What Changed

  • Resolve each message's delivery once, in the composer: one shared resolver (src/shared/native-chat-follow-up-delivery.ts) turns the follow-up setting and the alternate key into queue or steer, and the composer passes that result down the existing send path. Queue requests the existing queue-if-active delivery only on a compatible host; Steer keeps the existing direct send.
  • Keep queued-command and unanswerable-prompt delivery rules ahead of the preference. During Stopping, use the ordinary send choice.
  • Target the first waiting card, ignore repeated key events, and show the platform-specific Shift shortcut on its tooltip. An unavailable first card is never skipped; Stopping disables the card action.
  • Present the existing boolean as a Queue / Steer Select, retaining Queue as the default. Remove the obsolete card-menu switch and update six locales.
  • Review fixes: restore ordinary Stopping delivery and update two stale CI assertions for the send argument and settings Select.

Why

Separate shortcuts keep a second keypress from switching from “send my draft” to “send another card.” The existing send path preserves commands, attachments, in-flight protection and accepted-draft cleanup. The setting keeps its stored boolean, so no migration, host method or wire field is added.

Scope and rollout:

  • Intended: queued commands and prompts this client cannot answer still determine delivery first, preserving ordering and a usable send path.
  • Intended: an explicit first-card action can send while idle, through the existing card action. Stopping and command/returned/sending/edited-head barriers remain.
  • Existing behavior retained: ACP agents handle Steer by cancelling the running prompt and starting the new one, as existing direct sends and card Steer already do. This PR does not change provider delivery semantics.
  • Intended: one shared resolver, as the common pattern does, used by desktop here and by the phone in the stacked follow-up. It returns only queue or steer, with no separate "no turn running" result: the queue-if-active request is already conditional on the host's own live turn, so the host makes that call; deciding it from this client's view of the turn would race the host (a second message sent while the first turn is still starting would steer instead of queue).
  • Temporary: queue capability stays dark until switch-on; image queueing and phone delivery choices belong to separate PRs.

Linked Issue

N/A (maintainer PR).

Visual Proof

Hidden local macOS Electron validation used Playwright CDP and Codex gpt-5.6-terra at medium effort, with disposable homes and a deterministic app-server stand-in. Queue capability was enabled only for QA and restored afterward. These captures show before/after actions on the branch, not a built-base comparison.

Typed Cmd+Enter joins the working turn:

Typed alternate delivery

Two waiting cards before the Shift shortcut:

Two cards before Shift shortcut

The first card reaches the transcript, the second stays queued, and the draft remains:

First card sent and draft preserved

First-card tooltip:

First card Shift shortcut tooltip

Send during Stopping:

Stopping composer action

QA partial: rendered evidence and stand-in requests prove Queue-mode draft delivery, Enter queueing, first-card delivery with draft preservation, tooltip, empty no-op, and settings rendering. The Stopping send was observed; equality with Enter in both settings is pinned by a sender test rather than a comparative UI run. No same-input rendered base comparison or separate chat run with Steer selected was completed. No Windows, Linux, SSH, phone, or live-provider UI validation was run. Fresh-profile onboarding notices in the captures are existing UI.

Testing

  • 201 renderer tests across 15 explicit files and 25 Node host tests across 3 files passed.
  • tc:web passed through the machine queue.
  • orca-ci-checks ran before push: 19/22 checks passed. Remaining local failures are documented baseline/environment issues: missing now in untouched Node code, obsolete Spanish catalog keys, and local Bun's missing check script.
  • Two independent review rounds, architecture challenge, final readiness and dedicated performance review found no open proven PR defect at 515483f9a82eafbc1cfeff347c04348a682b145e.
  • Current-head CI is green: the single blocking watch completed with 14 passed, 18 skipped, no failures or pending checks. The old-head stale assertions were fixed, and the Windows probe / unattributed scheduler error did not recur.

Review

Remains a draft and unmerged. Main was inspected without syncing it into this branch; the final main sync remains for Brennan.

Agent skill upstream boundary

  • Not applicable: no upstream skill source was copied into the product diff.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

With queueing enabled, the old Cmd/Ctrl+Enter treated a typed draft like Enter, then changed targets to the newest queued card after the draft cleared. This draft separates those actions: Enter follows Queue / Steer, Cmd/Ctrl+Enter uses the opposite delivery for a typed draft while working, and Cmd/Ctrl+Shift+Enter sends the first waiting card while preserving unfinished typing.

The review fixed three issues in 515483f9a82eafbc1cfeff347c04348a682b145e: alternate delivery no longer changes the Stopping policy, and two stale CI assertions now match the send argument and settings Select. Two review rounds, the architecture challenge, readiness checklist, and dedicated performance pass found no remaining proven PR defect.

  • Verified: 201 renderer tests, 25 Node host tests, and tc:web passed. Current-head CI is green: 14 passed, 18 skipped, none failed or pending. Local static checks retain three documented baseline/toolchain failures.
  • Rendered proof: hidden isolated macOS Electron/CDP with a deterministic stand-in proved Queue-mode draft steering, Enter queueing, first-card delivery with draft preservation, tooltip, empty no-op, and settings states. Screenshots and before/after card-action captures are in the PR body. A Stopping send was observed; equality with Enter in both settings is pinned by the sender test.
  • QA partial: no same-input rendered base comparison or separate chat run with Steer selected; no live-provider, Windows/Linux, SSH, or phone UI validation. These remain confidence limits. Existing ACP cancel-and-restart steering is retained and disclosed, rather than changed here.

The queue capability remains off, and the QA-only change was restored. This remains a draft, unmerged, with a clean worktree; Brennan still owns the final sync with main before any merge.

One shared resolver maps the follow-up setting and the alternate key to
'queue' | 'steer'. The composer resolves it and passes the result down, in
place of a 'default' | 'alternate' intent carried through six layers.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Superseded by #36588, which ships the desktop queue and steer keys. The guard that refuses Cmd/Ctrl+Shift+Enter while a queued card's inline editor is open is tracked separately.

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