From 60a0edbbe227f05f16f27578d556c0d2b7dc0191 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 6 Mar 2026 11:43:14 -0600 Subject: [PATCH] [APP-1960] Fix current session refresh bug (#10019) --- src/state/session/agent.ts | 13 ------------- src/state/session/index.tsx | 6 ++++++ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/state/session/agent.ts b/src/state/session/agent.ts index fb8a1165a4..4177719912 100644 --- a/src/state/session/agent.ts +++ b/src/state/session/agent.ts @@ -72,19 +72,6 @@ export async function createAgentAndResume( await networkRetry(1, () => agent.resumeSession(prevSession)) } else { agent.sessionManager.session = prevSession - if (!storedAccount.signupQueued) { - networkRetry(3, () => agent.resumeSession(prevSession)).catch( - (e: any) => { - logger.error(`networkRetry failed to resume session`, { - status: e?.status || 'unknown', - // this field name is ignored by Sentry scrubbers - safeMessage: e?.message || 'unknown', - }) - - throw e - }, - ) - } } // after session is attached diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx index e63e180a4e..acdd8a4c9b 100644 --- a/src/state/session/index.tsx +++ b/src/state/session/index.tsx @@ -321,6 +321,12 @@ export function Provider({children}: React.PropsWithChildren<{}>) { ) if (syncedAccount && syncedAccount.refreshJwt) { if (syncedAccount.did !== state.currentAgentState.did) { + /* + * Web handling: if leader tab has switched to a diff account that is + * stale, it will refresh the session before triggering the update to + * follower tabs. Follower tabs will therefore receive the fresh + * session. See APP-1960, or ask Eric. + */ resumeSession(syncedAccount) } else { const agent = state.currentAgentState.agent as BskyAgent