Skip to content

Honor Enter/Shift+Enter setting consistently#168

Open
cfal wants to merge 1 commit into
mainfrom
send-enter
Open

Honor Enter/Shift+Enter setting consistently#168
cfal wants to merge 1 commit into
mainfrom
send-enter

Conversation

@cfal

@cfal cfal commented May 10, 2026

Copy link
Copy Markdown
Owner

This fixes composer submit behavior so the existing Send by Shift+Enter setting is the single source of truth for keyboard submission.

Previously, the shared shortcut helper forced Enter to insert a newline on mobile, regardless of the user setting. That made the setting behave inconsistently across composer surfaces and viewport types.

Changes:

  • Removed the mobile-specific override from the shared Enter submit predicate.
  • Updated the reply composer to stop passing viewport state into shortcut handling.
  • Added new-chat form coverage for both setting modes.
  • Added regression coverage proving mobile viewport state does not override the setting.
  • Regenerated Paraglide message modules so generated i18n stays in sync.

Validation:

  • bun run check
  • bun run test
  • timeout 90s bun run start --port 0

@cfal cfal requested a review from yongkangc May 10, 2026 03:43
Removes mobile-specific logic, so the "Send by Shift+Enter" setting now
applies equally on mobile and desktop. Enter key behavior in the prompt
composer now consistently follows the user preference regardless of
device. Updates related tests and removes unused isMobile handling.
@cfal cfal force-pushed the main branch 2 times, most recently from a5de8e1 to 5015066 Compare May 11, 2026 10:01
@0xSolarPunk

Copy link
Copy Markdown
Contributor

Closing as stale/not needed for now. This branch is dirty against current main, and later mobile composer work intentionally kept mobile Enter as newline/send-button behavior. The broader customizable-hotkeys request remains tracked in #171.

@0xSolarPunk

Copy link
Copy Markdown
Contributor

Closing as stale against current main. The current composer shortcut helper intentionally keeps mobile Enter as newline/send-button behavior, and the broader customizable hotkeys work remains tracked in #171.

@0xSolarPunk

Copy link
Copy Markdown
Contributor

Reviewed against current main: this PR should stay closed/stale rather than be fixed forward. Main still intentionally passes isMobile into shouldSubmitOnEnter so mobile Enter remains newline/send-button behavior, and the broader customizable-hotkeys request is tracked in #171. I do not have permission to close this PR directly.

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.

2 participants