From 9a7d21438bfaef241051046861c3ac5a0db0cb9b Mon Sep 17 00:00:00 2001 From: Auto Date: Tue, 23 Dec 2025 07:50:37 +0200 Subject: [PATCH] fix: Open in Browser button not working on Windows The handleOpenDevServerUrl function was looking up the dev server info using an un-normalized path, but the Map stores entries with normalized paths (forward slashes). On Windows, paths come in as C:\Projects\foo but stored keys use C:/Projects/foo (normalized). The lookup used the raw path, so it never matched. Fix: Use getWorktreeKey() helper which normalizes the path, consistent with how isDevServerRunning() and getDevServerInfo() already work. --- .../views/board-view/worktree-panel/hooks/use-dev-servers.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/ui/src/components/views/board-view/worktree-panel/hooks/use-dev-servers.ts b/apps/ui/src/components/views/board-view/worktree-panel/hooks/use-dev-servers.ts index a5d47990..90f7bce6 100644 --- a/apps/ui/src/components/views/board-view/worktree-panel/hooks/use-dev-servers.ts +++ b/apps/ui/src/components/views/board-view/worktree-panel/hooks/use-dev-servers.ts @@ -114,13 +114,12 @@ export function useDevServers({ projectPath }: UseDevServersOptions) { const handleOpenDevServerUrl = useCallback( (worktree: WorktreeInfo) => { - const targetPath = worktree.isMain ? projectPath : worktree.path; - const serverInfo = runningDevServers.get(targetPath); + const serverInfo = runningDevServers.get(getWorktreeKey(worktree)); if (serverInfo) { window.open(serverInfo.url, '_blank'); } }, - [projectPath, runningDevServers] + [runningDevServers, getWorktreeKey] ); const isDevServerRunning = useCallback(