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
Copy link
Copy Markdown
Owner

@cfal cfal commented May 10, 2026

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
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.

1 participant