From 97dbfc4940a191d851ca1d81373812cd49cc86d8 Mon Sep 17 00:00:00 2001 From: oliver Date: Tue, 8 Sep 2026 14:10:15 +0800 Subject: [PATCH] Reload after login so session history keeps WS identity. Soft reconnect raced Set-Cookie and left session.page unauthenticated while prompt still worked. Co-authored-by: Cursor --- uds-auth/lib/client.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/uds-auth/lib/client.js b/uds-auth/lib/client.js index 91d11df0..e4a90cfb 100644 --- a/uds-auth/lib/client.js +++ b/uds-auth/lib/client.js @@ -146,15 +146,9 @@ window.__ModuleLoader__.load({ } function reconnectAfterLogin() { - // 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 */ } + // Login Set-Cookie must land before WS upgrade. Soft reconnect races it: + // session.page then throws "登录后才能访问会话" (no ALS identity) while + // prompt still works — empty chat bubbles until a manual refresh. try { window.location.reload() } catch { /* ignore */ } }