Skip to content

Add configurable composer submit shortcut.#2648

Open
brianacdev wants to merge 3 commits into
pingdotgg:mainfrom
brianacdev:main
Open

Add configurable composer submit shortcut.#2648
brianacdev wants to merge 3 commits into
pingdotgg:mainfrom
brianacdev:main

Conversation

@brianacdev
Copy link
Copy Markdown

@brianacdev brianacdev commented May 11, 2026

What Changed

Adds a client setting for composer submit shortcut:

  • Enter
  • Shift+Enter
  • Cmd/Meta+Enter
  • Alt/Option+Enter
  • Ctrl+Enter
  • Button only

Default remains Enter (Unchanged).

Why

Avoids accidental prompt sends and supports users with different editor/chat muscle memory.

UI Changes

Before:

SCR-20260511-mfzh

After:

SCR-20260509-uawi

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes (N/A)

Note

Medium Risk
Changes the chat composer Enter-key submit behavior based on a new client setting, which can affect message sending UX and potentially cause unexpected submits/line breaks if misconfigured. Scope is limited and covered by unit tests plus schema defaults, keeping overall risk moderate.

Overview
Adds a new client setting, composerSubmitKeybinding, to control which Enter modifier combination submits the chat composer (including a button-only mode).

Wires the setting end-to-end: updates contracts schemas/defaults and client settings patching, adds a General settings UI selector with reset/restore-default support, and switches ChatComposer to use shared shouldSubmitComposerOnEnter key-handling logic (with new unit tests and updated persistence tests).

Reviewed by Cursor Bugbot for commit 8607f09. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add configurable composer submit shortcut to General settings

  • Adds a composerSubmitKeybinding field to ClientSettingsSchema (defaulting to "enter") with support for enter, shiftEnter, metaEnter, altEnter, ctrlEnter, and buttonOnly.
  • Adds a 'Composer submit' dropdown in General settings so users can change or reset the shortcut.
  • Replaces the hardcoded Enter && !shiftKey check in ChatComposer with shouldSubmitComposerOnEnter, a new utility in composer-logic.ts that matches the event modifiers against the configured keybinding.
  • Behavioral Change: existing users whose stored settings lack composerSubmitKeybinding will decode to "enter" (same as before), but users who switch to shiftEnter will no longer submit on bare Enter.

Macroscope summarized 8607f09.

brianacdev added 3 commits May 9, 2026 22:30
- support Enter shortcut variants
- persist and validate client setting
- rename composer send state helpers
- Rename deriveComposerSubmitState to deriveComposerSendState
- Update ChatComposer call sites and related test names
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels May 11, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8a574ce7-b18d-48bb-8a6b-1e423032f503

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 11, 2026

Approvability

Verdict: Approved

This PR adds a user-configurable keyboard shortcut setting for composer submission with comprehensive tests. The default behavior is preserved, changes are self-contained to settings and input handling, and no sensitive code paths are affected.

You can customize Macroscope's approvability policy. Learn more.

@GuilhermeVieiraDev
Copy link
Copy Markdown
Contributor

Wouldn't it make more sense to be on the Keybindings setting page?
image

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants