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 25, 19:45 UTC
Fix "Open in editor" to respect worktree path
Both openInEditor and the Cmd+O shortcut now use the thread's worktreePath when available instead of always using activeProject.cwd. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Julius Marminge committed
Feb 9, 2026 at 13:39 UTC
c5cbe159935680f201e90eee73619d79b7eb0ad1
1 file changed
+5
-3
apps/web/src/components/ChatView.tsx
+5
-3
@@ -368,17 +368,19 @@ export default function ChatView() {
368
if (e.key === "o" && (e.metaKey || e.ctrlKey) && !e.shiftKey) {
369
if (api && activeProject) {
370
e.preventDefault();
371
- void api.shell.openInEditor(activeProject.cwd, lastEditor);
371
+ const cwd = activeThread?.worktreePath ?? activeProject.cwd;
372
+ void api.shell.openInEditor(cwd, lastEditor);
373
}
374
}
375
};
376
window.addEventListener("keydown", handler);
377
return () => window.removeEventListener("keydown", handler);
377
- }, [api, activeProject, lastEditor]);
378
+ }, [api, activeProject, activeThread, lastEditor]);
379
380
const openInEditor = (editorId: EditorId) => {
381
if (!api || !activeProject) return;
381
- void api.shell.openInEditor(activeProject.cwd, editorId);
382
+ const cwd = activeThread?.worktreePath ?? activeProject.cwd;
383
+ void api.shell.openInEditor(cwd, editorId);
384
setLastEditor(editorId);
385
localStorage.setItem(LAST_EDITOR_KEY, editorId);
386
setIsEditorMenuOpen(false);