From 6d8d39a5d18bb233497c94ff3e930ac5e70c6970 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 17 Feb 2026 14:27:09 -0800 Subject: [PATCH] Guard branch sync when no active thread is selected - Prevent `SET_THREAD_BRANCH` dispatch unless both `activeThreadId` and `syncedBranch` exist - Avoids updating thread-branch state without an active thread context --- apps/web/src/components/BranchToolbar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/components/BranchToolbar.tsx b/apps/web/src/components/BranchToolbar.tsx index 30e9327060664b1012d1b59b8a910e34042b6c43..d02c94db95dc9b6d4b852d47be16d3dd9cdde3f9 100644 --- a/apps/web/src/components/BranchToolbar.tsx +++ b/apps/web/src/components/BranchToolbar.tsx @@ -94,7 +94,7 @@ export default function BranchToolbar({ activeThreadBranch, queryBranches, }); - if (!syncedBranch) return; + if (!activeThreadId || !syncedBranch) return; dispatch({ type: "SET_THREAD_BRANCH", -- 2.54.0