The best way to control Claude Code, Codex and more from any computer or phone
fix(web): Ctrl/Cmd+Enter sends new threads when the send shortcut needs it (#34810)
Julius Marminge committed
Nov 11, 2026 at 23:14 UTC
1a1f9ac18ed7cfa246207884aea93e3ce06851ce
2 files changed
+21
-1
apps/web/src/composer-logic.test.ts
+19
@@ -122,6 +122,25 @@ describe("composerSubmissionIntentForKey", () => {
122
).toBe(expected);
123
});
124
125
+ it.each([
126
+ ["mod-enter", "one line"],
127
+ ["mod-enter-multiline", "two\nlines"],
128
+ ] as const)(
129
+ "starts a new thread in the foreground on Mod+Enter with %s",
130
+ (sendShortcut, prompt) => {
131
+ const draft = { ...input, isDraftThread: true, sendShortcut, prompt };
132
+ expect(composerSubmissionIntentForKey({ ...draft, event: { ...enter, ctrlKey: true } })).toBe(
133
+ "foreground",
134
+ );
135
+ expect(
136
+ composerSubmissionIntentForKey({
137
+ ...draft,
138
+ event: { ...enter, ctrlKey: true, altKey: true },
139
+ }),
140
+ ).toBe("background");
141
+ },
142
+ );
143
+
144
it("honors the send preference with an existing install's saved alternate binding", () => {
145
const keybindings = mergeWithDefaultKeybindings(
146
compileResolvedKeybindingsConfig([
apps/web/src/keybindings.ts
+2
-1
@@ -115,7 +115,8 @@ function shortcutForContext(binding: ResolvedKeybindingRule, context: ShortcutMa
115
// Resolve persisted Mod+Enter against send preference without rewriting saved shortcuts.
116
if (
117
context.composerRequiresModifier &&
118
- binding.command === "composer.sendAlternate" &&
118
+ (binding.command === "composer.sendAlternate" ||
119
+ binding.command === "composer.sendBackground") &&
120
shortcut.key === "enter" &&
121
shortcut.modKey &&
122
!shortcut.metaKey &&