You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zjncs (via GitHub)" <gi...@apache.org> on 2026/10/06 09:10:57 UTC

[PR] fix(web): re-arm the loading flag while an instance-list retry is in flight [rocketmq-dashboard]

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

   Closes #5627
   
   ## Problem
   
   `reloadInstances` only bumped the retry token — `instancesLoading` stayed `false` for the whole refetch, and pages mirroring the flag into their table spinners (`consumer.tsx` / `topic.tsx` do `setLoading(instancesLoading)` in the no-instance branch) rendered a hard empty state with a dead-looking retry button instead of a loading state.
   
   ## Fix
   
   Re-arm the flag alongside the token bump:
   
   ```ts
   const reloadInstances = useCallback(() => {
       setInstancesLoading(true);
       setReloadToken((token) => token + 1);
   }, []);
   ```
   
   ## Verification (on unmodified rocketmq-studio 6a68042f)
   
   - New test `re-arms the loading flag while a retry is in flight`: first load rejects (failed=true), click retry, assert loading=true then the resolved state — **FAILS on the branch** (5s timeout, `instances-loading` stays `"false"`), **PASSES with this change**
   - Mutation check: stashing only the hook change makes the test fail again; restoring it passes
   - Regression: the full `useInstanceFilter` suite 4/4; the ConsumerPage suite (a consumer of the hook) 39/39 on the branch; `tsc --noEmit` clean
   
   ## Collision note
   
   `useInstanceFilter.ts` and its test are untouched by any of the 329 open PRs (verified per-PR file lists) — a clean PR. Note this targets **rocketmq-studio** because the retry mechanism does not exist on master.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(web): re-arm the loading flag while an instance-list retry is in flight [rocketmq-dashboard]

Posted by "zjncs (via GitHub) via commits" <co...@rocketmq.apache.org>.
zjncs closed pull request #5628: fix(web): re-arm the loading flag while an instance-list retry is in flight
URL: https://github.com/apache/rocketmq-dashboard/pull/5628


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org