From 1053403d88e7acbe4e9c229728bcc6f9409e8b3f Mon Sep 17 00:00:00 2001 From: oliver Date: Tue, 8 Sep 2026 11:45:07 +0800 Subject: [PATCH] Prefer soft reconnect after UDS login instead of full reload. Workspace ACL no longer depends on a hard refresh; keep reload only as fallback. Co-authored-by: Cursor --- uds-auth/lib/client.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/uds-auth/lib/client.js b/uds-auth/lib/client.js index f9b681ea..91d11df0 100644 --- a/uds-auth/lib/client.js +++ b/uds-auth/lib/client.js @@ -146,9 +146,15 @@ window.__ModuleLoader__.load({ } function reconnectAfterLogin() { - // Soft WS reconnect often keeps a workspace.follow subscription that was - // opened while anonymous (empty workspace list). Full reload makes the - // first follow run with fallback/UDS cookies so historical workspaces show. + // Prefer soft WS reconnect (re-upgrade with cookies). Full reload only + // if connection.reconnect is unavailable — workspace ACL no longer needs + // a hard refresh after login. + try { + if (typeof window.__udsAuthReconnect === 'function') { + window.__udsAuthReconnect() + return + } + } catch { /* fall through */ } try { window.location.reload() } catch { /* ignore */ } }