Add configurable composer submit shortcut.#2648
Conversation
- 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
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
ApprovabilityVerdict: 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. |

What Changed
Adds a client setting for composer submit shortcut:
Default remains Enter (Unchanged).
Why
Avoids accidental prompt sends and supports users with different editor/chat muscle memory.
UI Changes
Before:
After:
Checklist
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
ChatComposerto use sharedshouldSubmitComposerOnEnterkey-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
composerSubmitKeybindingfield toClientSettingsSchema(defaulting to"enter") with support forenter,shiftEnter,metaEnter,altEnter,ctrlEnter, andbuttonOnly.Enter && !shiftKeycheck inChatComposerwithshouldSubmitComposerOnEnter, a new utility in composer-logic.ts that matches the event modifiers against the configured keybinding.composerSubmitKeybindingwill decode to"enter"(same as before), but users who switch toshiftEnterwill no longer submit on bare Enter.Macroscope summarized 8607f09.