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

   ## Why
   `rulesLoading`/`usersLoading` on the ACL page are initialized to `true` and 
cleared once after the first fetch, but never set again. Every subsequent query 
— filter change (principal/resource/scope/version/decision, user keyword) or 
pagination change — runs with the spinner off, so the tables keep presenting 
the previous page rows as if they already matched the new filters for the whole 
request window (and keep them on failure, with only a toast). The sibling list 
pages (consumer, message, DLQ) all re-engage loading on each fetch; this page 
diverged.
   
   ## What changed
   `web/src/pages/instance/acl.tsx`: the fetch effect now flips both loading 
flags to `true` (deferred to a microtask, same pattern as the cluster page 
registry loading, to satisfy `react-hooks/set-state-in-effect`) whenever it 
re-runs. The existing `finally` blocks already clear them per response.
   
   ## Validation
   - Added a regression test in 
`web/src/pages/instance/__tests__/AclPage.test.tsx`: change the principal 
filter while the follow-up `listAclRules` promise is held pending, assert the 
table spinner appears (`.ant-spin-spinning`), then resolve and assert it 
disappears. Fails on the old code (verified by re-running with the fix 
stashed), passes after the fix.
   - Full AclPage test file passes (27 tests).


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