zmuxuny opened a new pull request, #7102:
URL: https://github.com/apache/rocketmq-dashboard/pull/7102

   ### Which Issue(s) This PR Fixes
   
   Fixes #7097
   Fixes #7116
   
   ### Brief Description
   
   Keep old asynchronous requests from owning a newer SPA login. This 
consolidates the instance-list request isolation from #7118 into the existing 
session-boundary fix in #7102, preserving both original contributions and their 
regressions rather than maintaining separate review queues for the same 
invariant.
   
   Logout and login navigate within the SPA. Existing HTTP requests and AI 
send/attach fetches can therefore return 401 after a new login, and the 
module-level instance-list coalescing map can otherwise let a new session reuse 
an old inventory request.
   
   - Advance a page-local revision on every login and logout, including a 
same-user relogin.
   - Capture request ownership in the shared Axios client and both AI streaming 
fetch paths. Only current-session 401 responses clear authentication and 
navigate to login; old requests still reject normally.
   - Use that same revision to invalidate instance-list coalescing across 
session boundaries, including clearing outside the Zustand store. Preserve 
query/data-mode keys, same-session sharing, defensive copies, mutation 
invalidation, and promise-identity cleanup.
   - Exercise the real Axios → instance API → service path: an old 401 must 
neither erase a new login nor remove its shared pending inventory request. 
Retain tests for old success/failure and both same-user and different-user 
relogin.
   
   This is scoped to one SPA lifetime. It does not cancel already-issued 
requests, change backend authorization, synchronize sessions across tabs, or 
claim a private cross-user data leak.
   
   ### Validation
   
   - Focused session/client/AI/inventory tests: 87 passed across 5 files.
   - TypeScript project build: passed.
   - ESLint and Prettier for all 9 changed files: passed.
   - Production build (`npm run build`), including the license gate: passed.
   - Baseline negative control: 11 failures / 73 passes against unchanged base 
production code, including nine behavioral regressions and two tests for the 
absent revision API.
   - Original patches combined without revision unification: new integration 
tests give 1 failure / 2 passes, demonstrating the outside-store clear gap.
   - Full frontend suite attempted sequentially: 162/163 files and 1,840/1,849 
tests passed, but the command exited 1 after the SystemAlertsPage worker exited 
unexpectedly. No assertion failures were reported. Isolated SystemAlertsPage 
rerun passed all 32 tests. This is partial full-suite validation, not a green 
full-suite claim.
   
   The two original commits retain their original authorship. No dependency 
upgrades or unrelated UI changes.
   


-- 
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