Repository navigation
Conversation
Focus starts in the composer when an agent asks a question, and the 1-9 option shortcuts ignore keys typed into the editor, so pressing the digit shown on a badge typed it into the answer instead. Option+digit (and Control+digit on macOS) now picks the option from the answer box. Bare digits still type there, and Mod+digit still jumps threads.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Adds modifier-digit shortcuts to select question options while focus remains in the answer box. Existing question-availability safeguards and option-selection behavior remain in place, limiting the change to a bounded keyboard interaction. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
When an agent asks a question, each option shows a number badge (1, 2, 3...) and focus starts in the composer ("Type your own answer, or leave this blank to use the selected option"). The digit shortcut ignores keys from the editor, so pressing 1 types "1" into the answer instead of picking option 1. Tab moves focus to the model picker trigger, which the shortcut also ignores, so with the default focus there is no keyboard path to the option the badge points at.
Repro: have an agent call AskUserQuestion, then press 1 without clicking anywhere. Expected: option 1 is picked. Actual: "1" appears in the composer.
Change
In
ComposerPendingUserInputPanel, a keydown from the composer editor picks option N on Option+N, and also on Control+N on macOS. The digit comes fromevent.codebecause Option rewritesevent.keyon macOS (Option+1 gives "¡"). Bare digits still type in the answer box, and Mod+N (Cmd on macOS, Ctrl elsewhere) is left forthread.jump.N. Behavior outside the editor is unchanged.Scope
Fixes #37354. The number badges point to a key that does nothing in the focus state the panel opens with.
Before (pressing 1 types into the answer box):
Verification
ComposerPendingUserInputPanel.browser.test.tsxwith focus in acomposer-editorelement: Option+1 toggles option 1. Bare 1, Cmd+1, Option+Shift+1 and Option+2 (no second option) do not. Option+1 leaves the editor empty.ComposerPendingUserInputPanelbrowser test files pass.vp check(lint and format) is clean on both files, andapps/webtypecheck passes.There's no after screenshot because nothing visual changes. The fix is keyboard-only.
Written with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code