Skip to content

Commit 60a6e5c

Browse files
committed
Fix truthiness check dropping null worktreePath from launch context
When launchContext exists with worktreePath: null, the truthiness check (launchContext?.worktreePath) incorrectly falls through to the server thread's worktreePath. This creates an inconsistency where cwd comes from the launch context but worktreePath comes from the server thread. Fix by checking for the existence of launchContext itself, so that a null worktreePath is correctly preserved from the launch context.
1 parent 1b1f688 commit 60a6e5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/web/src/components/ChatView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ function PersistentThreadTerminalDrawer({
443443
const [localFocusRequestId, setLocalFocusRequestId] = useState(0);
444444
const worktreePath = serverThread?.worktreePath ?? draftThread?.worktreePath ?? null;
445445
const effectiveWorktreePath = useMemo(() => {
446-
if (launchContext?.worktreePath) {
446+
if (launchContext) {
447447
return launchContext.worktreePath;
448448
}
449449
return worktreePath;

0 commit comments

Comments
 (0)