From 86a2cbc3d436866a0d486bafabc5911cc8dcf3ef 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 30e9327060..d02c94db95 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",