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 <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-08 11:45:07 +08:00
parent 4a477f3513
commit 1053403d88

View file

@ -146,9 +146,15 @@ window.__ModuleLoader__.load({
} }
function reconnectAfterLogin() { function reconnectAfterLogin() {
// Soft WS reconnect often keeps a workspace.follow subscription that was // Prefer soft WS reconnect (re-upgrade with cookies). Full reload only
// opened while anonymous (empty workspace list). Full reload makes the // if connection.reconnect is unavailable — workspace ACL no longer needs
// first follow run with fallback/UDS cookies so historical workspaces show. // a hard refresh after login.
try {
if (typeof window.__udsAuthReconnect === 'function') {
window.__udsAuthReconnect()
return
}
} catch { /* fall through */ }
try { window.location.reload() } catch { /* ignore */ } try { window.location.reload() } catch { /* ignore */ }
} }