diff --git a/src/renderer/store/slices/teamSlice.ts b/src/renderer/store/slices/teamSlice.ts index 2bc9512e..5f9e7b18 100644 --- a/src/renderer/store/slices/teamSlice.ts +++ b/src/renderer/store/slices/teamSlice.ts @@ -128,7 +128,10 @@ import { collectTeamScopedStateRemovals, collectTeamScopedVisibleLoadingResets, } from '../team/teamScopedStateCleanup'; -import { structurallyShareTeamSnapshot } from '../team/teamSnapshotStructuralSharing'; +import { + structurallySharePlainValue, + structurallyShareTeamSnapshot, +} from '../team/teamSnapshotStructuralSharing'; import { parseToolApprovalSettings } from '../team/teamToolApprovalSettings'; import { noteTeamRefreshFanout } from '../teamRefreshFanoutDiagnostics'; import { @@ -1572,12 +1575,12 @@ export const createTeamSlice: StateCreator = (set, isInitialFetch: wasFirst, }); - set({ - globalTasks: tasks, + set((state) => ({ + globalTasks: structurallySharePlainValue(state.globalTasks, tasks), globalTasksLoading: false, globalTasksInitialized: true, globalTasksError: null, - }); + })); } catch (error) { if (!isContextRequestScopeCurrent(get, requestScope)) { continue;