@devries-cameron20 / t3code Mirror · read-only / commits / 6fe97fed8d
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, 23:15 UTC

fix(web): new-thread shortcuts work while the command palette lists them (#19055)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>

Roger V committed Oct 20, 2026 at 06:13 UTC 6fe97fed8d9d454a08ef22bb56ad3578b2576304
1 file changed +17 -5
apps/web/src/components/CommandPalette.tsx
+17 -5
@@ -2875,14 +2875,26 @@ function OpenCommandPaletteDialog(props: {
2875 function handleKeyDown(event: KeyboardEvent<HTMLInputElement>): void {
2876 const command = resolveShortcutCommand(event, keybindings, {
2877 platform: navigator.platform,
2878 - context: { modelPickerOpen: false },
2878 + context: { modelPickerOpen: false, editableFocus: true },
2879 });
2880 - if (threadJumpIndexFromCommand(command ?? "") !== null) {
2880 + // Global new-thread handlers ignore shortcuts while the palette is open.
2881 + const isJump = threadJumpIndexFromCommand(command ?? "") !== null;
2882 + const isNewThread =
2883 + !event.nativeEvent.isComposing &&
2884 + event.keyCode !== 229 &&
2885 + (command === "chat.new" ||
2886 + command === "chat.newLocal" ||
2887 + command === "chat.newWithoutProject");
2888 + const matchingItem =
2889 + isJump || isNewThread
2890 + ? displayedGroups
2891 + .flatMap((group) => group.items)
2892 + .find((item) => item.shortcutCommand === command)
2893 + : undefined;
2894 + if (isJump || matchingItem) {
2895 + (event as typeof event & { preventBaseUIHandler?: () => void }).preventBaseUIHandler?.();
2896 event.preventDefault();
2897 event.stopPropagation();
2883 - const matchingItem = displayedGroups
2884 - .flatMap((group) => group.items)
2885 - .find((item) => item.shortcutCommand === command);
2898 if (matchingItem) {
2899 executeItem(matchingItem);
2900 }