Loyal-Young opened a new issue, #6412:
URL: https://github.com/apache/rocketmq-dashboard/issues/6412

   ### Before Creating the Bug Report
   - [x] Searched useVisiblePolling and poll/unmount issues; existing fixes 
cover overlap and timers, not already queued Promise callbacks.
   - [x] This concerns RocketMQ Studio.
   
   ### Studio Version
   rocketmq-studio at 779b8c0e7aed2396d3cc72743dcd544ea48e9ae6.
   
   ### Runtime Environment
   Windows; Node 24; React/Vitest with fake timers for deterministic 
scheduling. No live broker needed.
   
   ### Connected RocketMQ Cluster
   Not relevant to scheduling reproduction.
   
   ### Describe the Bug
   useVisiblePolling schedules poll through Promise.resolve().then(poll). 
Cleaning up the effect removes the timer/listener but cannot cancel this queued 
microtask. Disabling live refresh, changing the callback or unmounting between 
the timer/visibility event and that microtask still starts the obsolete 
request. The visibility check is similarly only performed before queuing it.
   
   ### Steps to Reproduce
   1. Trigger a poll timer or visible event synchronously.
   2. Before draining the Promise queue, disable polling or unmount/change its 
effect.
   3. Drain microtasks: the obsolete poll callback runs.
   
   ### What Did You Expect to See?
   Recheck effect liveness and visibility immediately before invoking the 
queued poll, while keeping the existing shared in-flight guard for requests 
already started.
   
   ### What Did You See Instead?
   Cleanup cannot prevent the deferred callback from starting.
   
   ### Are You Willing to Submit a Pull Request?
   - [x] Yes, with lifecycle regressions and positive overlap/re-enable 
coverage.


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