Skip to content

fix(site): preserve agent send shortcuts in narrow viewports - #29613

Merged
bpmct merged 2 commits into
mainfrom
fix/agents-small-viewport-enter
Sep 20, 2026
Merged

bpmct merged 2 commits into
mainfrom
fix/agents-small-viewport-enter

Conversation

@bpmct

@bpmct bpmct commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Enter and Cmd/Ctrl+Enter inserted newlines instead of sending when the Coder Agents window was narrower than 640px. This broke desktop split views even with the Cmd/Ctrl+Enter preference enabled.

Use pointer capability instead of window width for touch keyboard behavior. Narrow desktop windows respect the send preference, Cmd/Ctrl+Enter works at every width, and Shift+Enter still inserts a newline.

Fixes #28438. Refs CODAGT-1006.

Tested on web (macOS/Chrome):

Screen.Recording.2026-09-19.at.7.30.59.PM.mov

Tested on iOS:

ScreenRecording_09-19-2026.19-32-32_1.MP4
Implementation and verification notes

The change is limited to the shared composer Enter handler, its existing tests, and the mobile composer story. Plain Enter inserts a newline when the primary pointer is coarse, including on larger touch devices. Cmd/Ctrl+Enter bypasses that check. Pointer capability is a proxy for touch input, not a physical-keyboard detector.

Regression tests reproduced the bug before the fix. All 87 targeted unit tests and 99 composer stories pass, along with frontend formatting, lint, typechecking, and the full make pre-commit checks. Browser checks confirmed submit callbacks at 390px and 1280px with both send preferences and touch emulation. A dev-instance chat also completed through dogfood AI Gateway.

The related queue-button work in #29507 is not a dependency.

Generated by Coder Agents on behalf of @bpmct.

@linear-code

linear-code Bot commented Sep 20, 2026

Copy link
Copy Markdown

CODAGT-1006

@bpmct
bpmct marked this pull request as ready for review September 20, 2026 00:15
@bpmct
bpmct merged commit 854bd61 into main Sep 20, 2026
30 checks passed
@bpmct
bpmct deleted the fix/agents-small-viewport-enter branch September 20, 2026 15:13
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(ui): Prompt textarea 'Enter' keybinding switches to newline at viewports < 640px

2 participants