From b623105c71b54e4a7c7f35bea253e8321a225107 Mon Sep 17 00:00:00 2001 From: Hieu Le Date: Mon, 9 Mar 2026 22:43:21 -0400 Subject: [PATCH] fix(app): open project when navigating directly to a project URL --- packages/app/src/pages/layout.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/app/src/pages/layout.tsx b/packages/app/src/pages/layout.tsx index 052a03c5491..106de235bf9 100644 --- a/packages/app/src/pages/layout.tsx +++ b/packages/app/src/pages/layout.tsx @@ -586,6 +586,20 @@ export default function Layout(props: ParentProps) { ), ) + createEffect( + on( + () => ({ ready: pageReady(), layoutReady: layoutReady(), dir: currentDir() }), + (value) => { + if (!value.ready) return + if (!value.layoutReady) return + if (!value.dir) return + const list = layout.projects.list() + if (list.find((p) => p.worktree === value.dir || p.sandboxes?.includes(value.dir))) return + openProject(value.dir, false) + }, + ), + ) + const workspaceName = (directory: string, projectId?: string, branch?: string) => { const key = workspaceKey(directory) const direct = store.workspaceName[key] ?? store.workspaceName[directory]