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

   ## What is the purpose of the change
   
   Fixes #1706. `ConsumerPageContent` is already keyed by the selected 
instance, but it also scheduled state resets from an effect. That duplicated 
the instance lifecycle, allowed stale instance-local groups to remain visible 
until a timer ran, and made the no-instance loading state indirect.
   
   ## Brief changelog
   
   - Derive the no-instance loading state directly from `instancesLoading`.
   - Keep group request loading state local to the selected instance.
   - Rely on the keyed component boundary to discard groups, selections, and 
modal state immediately when the instance changes.
   - Remove the timer-based state reset from the no-instance effect path.
   - Add a regression test proving old groups disappear before the next 
instance request resolves.
   
   ## Verifying this change
   
   - `npm test -- src/pages/instance/__tests__/ConsumerPage.test.tsx` — 30 
tests passed.
   - `npm run build` — passed.
   - `npm run lint -- src/pages/instance/consumer.tsx 
src/pages/instance/__tests__/ConsumerPage.test.tsx` — 0 errors (10 pre-existing 
warnings elsewhere).
   
   - [x] A GitHub issue is filed and this PR addresses only that issue.
   - [x] The pull request title follows the required issue format.
   - [x] The description explains what, how, and why.
   - [x] A focused regression test covers the corrected lifecycle behavior.
   - [x] The affected frontend test, production build, and lint checks pass.
   - [ ] Apache ICLA is not expected for this focused fix; maintainers can 
advise if needed.


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