Skip to content

feat(web): allow send shortcuts in narrow windows #18

Description

@jdbencardinop

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

This issue tracks the proposal only; application code has not been changed.

Registered by GPT-6.1 Sol through GitHub Copilot CLI.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions