Loyal-Young opened a new pull request, #5362:
URL: https://github.com/apache/rocketmq-dashboard/pull/5362

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5361
   
   ### Brief Description
   
   `AuthGate` now reacts when another browser tab changes the persisted Studio 
identity. It immediately hides protected route content and rechecks 
`/auth/status`, so signing out or switching accounts in one tab does not leave 
the other tab showing the previous account's page state. The server remains the 
authority; a failed status check still fails closed.
   
   The listener is limited to the three persisted identity keys and storage 
clears. It is disabled in mock mode and removed when the gate unmounts.
   
   ### Verification
   
   - `cd web && node node_modules/vitest/vitest.mjs run src/App.test.tsx 
--pool=threads --maxWorkers=1 --reporter=dot` — 9 tests passed before the 
second account-switch assertion was added.
   - `cd web && node node_modules/vitest/vitest.mjs run src/App.test.tsx -t 
'another tab' --pool=threads --maxWorkers=1 --reporter=dot` — 2 cross-tab tests 
passed after the final change.
   - `cd web && node node_modules/eslint/bin/eslint.js src/App.tsx 
src/App.test.tsx` — passed.
   - `cd web && node node_modules/typescript/bin/tsc -p tsconfig.app.json 
--noEmit --pretty false` — passed.
   - `git diff --check` — passed.
   
   ### AI Assistance
   
   AI assistance helped inspect the auth gate and draft the cross-tab 
regression cases. I reviewed the event handling, cleanup and server 
revalidation behavior, then ran the checks above.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to