Loyal-Young opened a new issue, #6046: URL: https://github.com/apache/rocketmq-dashboard/issues/6046
### Before Creating the Bug Report - [x] Searched existing issues and PRs (persistRunSpeed, speed/refetch and open AI PRs). ### Studio Version rocketmq-studio at 29fe48abc98583cfc77f97188f187cca3ad85dae. ### Runtime Environment Windows, Node 24.18.0; frontend source inspection with a deferred-promise regression to follow. No live cluster is required for this hook lifecycle. ### Connected RocketMQ Cluster Not required: the relevant endpoints are the AI run-speed report and conversation timeline. ### Describe the Bug In useAgentRun.finishStream, the request ID is checked before awaiting persistRunSpeed, but the next operation invokes optionsRef.current.refetchTimeline without checking ownership again. A pending report can outlive navigation, unmount, or a new send. It then invokes the current conversation's callback (or the unmounted page's callback), introducing an obsolete timeline reload. The later guard only protects cleanup after that reload. ### Steps to Reproduce 1. Finish a run with enough deltas to report a measured speed; delay reportRunSpeed. 2. Switch conversations, unmount, or start the next run while the report is pending. 3. Resolve or reject the report. 4. Observe that the old finalizer still calls refetchTimeline. ### What Did You Expect to See? Only the currently owned stream may begin its final timeline reload. A superseded report can complete without triggering a new request. A report failure for the current stream should still allow its normal reload. ### Additional Context The existing guard after refetch remains necessary. #5196 concerns the server-side speed/status write race, and #5711 covers transcript rendering; neither covers the await boundary here. ### Are You Willing to Submit a Pull Request? Yes; a bounded lifecycle guard with stale, current-success and current-failure cases. ### AI assistance AI assistance was used to inspect the source and draft this report. Validation results will be recorded in the PR. -- 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]
