Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): avoid duplicate owner boundary finalization

DavidShen9e000236bea6
diff --git a/apps/desktop/src/renderer/contexts/AuthContext.tsx b/apps/desktop/src/renderer/contexts/AuthContext.tsx
index 18200a6f50..87f5eaad89 100644
--- a/apps/desktop/src/renderer/contexts/AuthContext.tsx
+++ b/apps/desktop/src/renderer/contexts/AuthContext.tsx
@@ -182,12 +182,7 @@ export function AuthProvider({
// leave the current account's task resumable in its original running state.
publishDataOwnerGeneration(null, undefined, { finalizeSessions: false });
try {
- const result = await operation();
- // The boundary has committed once the auth operation resolves. Finalize
- // here as well as on the pushed snapshot so a delayed auth event cannot
- // leave the old owner running after a successful switch.
- cancelRemoteOptimisticSendsForDataOwnerBoundary();
- return result;
+ return await operation();
} catch (error) {
// Restore the exact main-owned generation. Recomputing it locally would
// make every stamped push from the still-active owner look stale after a