Repository navigation
feat(web): allow send shortcuts in narrow windows #18
Description
Request
Add an opt-in, persisted client setting that bypasses the web composer viewport-width submission guard. Keep it off by default so mobile software keyboards retain Enter-to-newline behavior.
A laptop user with a small screen and two apps side by side can have a web window at 639 CSS pixels or less while using a physical keyboard. Currently Enter inserts a newline, and Ctrl/Cmd+Enter cannot bypass the width guard; submitting the draft requires the arrow button.
Requested behavior
- When enabled, use the same send-shortcut rules as a normal-width window, without changing Shift+Enter, background draft submission, or existing Queue/Steer semantics.
- Make the setting discoverable, persisted, and reversible without resizing or reloading.
- Preserve existing behavior by default and leave normal-width windows unchanged.
- Integrate with upstream send-shortcut configuration rather than duplicating it.
- Keep automatic device/keyboard detection as a separate follow-up. Native mobile behavior and provider/server semantics are outside this request.
Where this came from
The width guard is an upstream mobile-web fix, not a fork-specific change. Issue #2478 reported that Android software keyboards could not create multiline prompts. PR #3930, merged July 17, introduced the mobile-width newline rule. PR #7821, merged August 21, added Ctrl/Cmd+Enter background submission but preserved that guard.
ChatComposer uses useMediaQuery("max-sm") as its mobile signal, and composerSubmissionIntentForEnter rejects keyboard submission before considering modifiers. Width therefore acts as a proxy for device/keyboard type. This request preserves the original mobile fix while offering a practical override for narrow laptop windows.
At investigation time on October 1, this checkout had no configurable send shortcut. Current upstream has Enter, Ctrl/Cmd+Enter, and Ctrl/Cmd+Enter-for-multiline modes, but still gives the mobile-width guard precedence.
Registered tpatch request
- Feature:
composer-narrow-viewport-submit-override - Lifecycle: requested, agent-authored through Path B; no implementation or phase advancement.
- Request branch, based on
982929e93. - Full request, history, scope, and acceptance expectations.
- Lifecycle metadata.
- Registration commit: 8a5dd4140.
This issue tracks the proposal only; application code has not been changed.
Registered by GPT-6.1 Sol through GitHub Copilot CLI.
Activity
jdbencardinop commentedon Oct 29, 2026
Retested at 600px on v0.1.4: Meta+Enter dispatched both a new and an existing thread message, with two persisted completed local Replay runs and no paid model calls. The new-draft shortcut submits in the background; the existing narrow composer was expanded normally first. This does not claim the separate optional plain-Enter scenario.
Reviewed report and visual evidence: #1 (comment)
Candidate only; no main promotion or live upgrade.