zjncs opened a new issue, #5627:
URL: https://github.com/apache/rocketmq-dashboard/issues/5627

   ## Description
   
   On the `rocketmq-studio` branch, `useInstanceFilter` exposes 
`instancesFailed` + `reloadInstances` (a retry token bump), but 
`reloadInstances` never re-arms the loading flag 
(`web/src/hooks/useInstanceFilter.ts:104`):
   
   ```ts
   const reloadInstances = useCallback(() => setReloadToken((token) => token + 
1), []);
   ```
   
   `instancesLoading` is only initialized `true` (line 53) and set `false` in 
the effect's `finally`; bumping `reloadToken` re-runs the effect but nothing 
sets loading back to `true`.
   
   Pages mirror this flag into their own table spinners — `consumer.tsx:366` 
and `topic.tsx:477` do `setLoading(instancesLoading)` in the no-instance branch 
— so after a failed instance-list load, clicking retry leaves `instancesLoading 
=== false` for the whole refetch: the page renders a hard empty state and a 
dead-looking retry button instead of a loading state.
   
   Failing test on unmodified `rocketmq-studio` (6a68042f): first load rejects 
(failed=true, loading=false), click retry, wait for loading=true — **times out 
at 5s**; `instances-loading` stays `"false"`.
   
   ## Expected behavior
   
   `reloadInstances` re-arms the loading flag alongside the token bump, so the 
in-flight retry renders as a load.
   
   ## Environment
   
   - branch: rocketmq-studio (6a68042f) — the retry mechanism does not exist on 
master
   - file: `web/src/hooks/useInstanceFilter.ts` (~104)


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