Skip to content

Add an Enter-to-queue, Cmd/Ctrl+Enter-to-steer follow-up mode - #11

Draft
felipeorlando wants to merge 1 commit into
mainfrom
issue-7-followup-shortcut
Draft

felipeorlando wants to merge 1 commit into
mainfrom
issue-7-followup-shortcut

Conversation

@felipeorlando

Copy link
Copy Markdown
Owner

Closes #7

Adds a third queue-steer follow-up mode. While a turn runs: Enter queues, ⌘+Enter (macOS) / Ctrl+Enter steers. Idle sessions send normally on both. Shift+Enter still inserts a newline. The existing Queue-only and Steer-only modes are unchanged.

The keyboard intent flows through the existing submit path — no second queue implementation. Decision logic lives in two pure helpers in the new src/lib/followUp.ts: isSteerShortcut(event, isMac) and resolveFollowUpAction(behavior, steerShortcut). App.tsx resolves the action at submit time; intent === "plan" still forces queue, and explicit followUpBehavior: "steer" callers (queued-row Steer, resume-queue) are unaffected.

Needs careful review

  • No other keydown branch was touched. The mention picker, slash/skill picker and compact-command branches still consume Enter first, modifier or not.
  • Composition handling is byte-for-byte unchanged. No isComposing guard was added — the upstream IME bug (Composer sends the message when Enter is pressed to commit IME composition (CJK input) hardbeat920/monocode#105) is out of scope, and guarding here would change behavior beyond this issue. Worth exercising with CJK input before merging.
  • The Segmented label reads "Shortcut", not the full "Queue, shortcut to steer" — the control is a fixed-width 3-column track and the full phrase wraps. The row description spells out the platform-correct chord.

Verification

npm run check:web — exit 0, 128 files / 1331 tests. tsc --noEmit clean. 7 new tests for the helpers, plus a persistence round-trip test.

No Composer render test — the repo has no React Testing Library setup for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

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.

Add an Enter-to-queue, Cmd/Ctrl+Enter-to-steer follow-up mode

1 participant