TypeScript
Fix flash of 'Initialize git' when switching branch/worktree
Julius Marmingecf66f53a5559
diff --git a/apps/web/src/components/BranchToolbar.tsx b/apps/web/src/components/BranchToolbar.tsxindex 9fd8774d0fe..2379d0b91cc 100644--- a/apps/web/src/components/BranchToolbar.tsx+++ b/apps/web/src/components/BranchToolbar.tsx@@ -37,7 +37,9 @@ export default function BranchToolbar({ envMode, onEnvModeChange, envLocked }: B});const branches = branchesQuery.data?.branches ?? [];- const isRepo = branchesQuery.data?.isRepo ?? false;+ // Default to true while loading — showing "Initialize git" during a fetch is wrong,+ // and worktrees are inherently git repos.+ const isRepo = branchesQuery.data?.isRepo ?? !branchesQuery.isLoading;// ── Mutations ─────────────────────────────────────────────────────────