@devries-cameron20 / t3code Mirror · read-only / commits / e74b410e29
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 02:00 UTC

fix(web): keybinding settings recognize the previewOpen condition (#29642)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Alex Southwell committed Nov 10, 2026 at 01:31 UTC e74b410e29bb95c7f34bebb9d61168c9194a8edb
2 files changed +7
apps/web/src/components/settings/KeybindingsSettings.logic.test.ts
+6
@@ -9,10 +9,12 @@ import { resolveShortcutCommand } from "../../keybindings";
9
10 import {
11 buildKeybindingRows,
12 + buildWhenVariableOptions,
13 keybindingConflictLabels,
14 keybindingFromKeyboardEvent,
15 parseWhenExpressionDraft,
16 shortcutToKeybindingInput,
17 + unknownWhenVariables,
18 whenAstToExpression,
19 } from "./KeybindingsSettings.logic";
20
@@ -205,6 +207,10 @@ describe("KeybindingsSettings.logic", () => {
207 },
208 },
209 });
210 + const previewOpenDraft = parseWhenExpressionDraft("previewOpen && !previewFocus");
211 + assert(previewOpenDraft.ok);
212 + expect(unknownWhenVariables(previewOpenDraft.value)).toEqual([]);
213 + expect(buildWhenVariableOptions()).toContain("previewOpen");
214 expect(parseWhenExpressionDraft("editorFocus &&")).toEqual({
215 ok: false,
216 message: "Use variables with !, &&, ||, and parentheses.",
apps/web/src/components/settings/KeybindingsSettings.logic.ts
+1
@@ -60,6 +60,7 @@ export type KeybindingCommandOption = KeybindingCommand;
60 const CORE_WHEN_VARIABLES = [
61 "terminalFocus",
62 "terminalOpen",
63 + "previewOpen",
64 "isWeb",
65 "isDesktop",
66 "true",