Loyal-Young opened a new issue, #5781: URL: https://github.com/apache/rocketmq-dashboard/issues/5781
### Before Creating the Bug Report - [x] Searched existing reports for `useAiSend` and conversation creation/navigation. #5411/#5412 concern duplicate sends; this report concerns an abandoned creation finishing after navigation. ### Studio Version `rocketmq-studio@c99b9ad50b79467546997e51f3401d57ceebea5f`. ### Describe the Bug `useAiSend` awaits the default-instance lookup and conversation creation without checking whether the initiating route is still active. After unmounting the AI page, or switching to an existing conversation, the old request can still arm a pending prompt and replace-navigate to its newly created conversation. A late failure also invokes the obsolete error callback. ### Steps to Reproduce 1. Send on the bare `/ai` route with the instance lookup or creation response delayed. 2. Navigate to another page or an existing conversation. 3. Complete the old creation request. 4. The old hook replaces the current route with the newly created conversation. ### Expected Behavior When the initiating context changes, a stale creation must not navigate, arm a send, invoke an obsolete error callback, or start the creation after a delayed instance lookup. An already submitted server request may still complete. ### Verification Plan Deferred hook regressions for unmount and conversation changes before the dependent request or navigation, plus a successful current-route creation control. ### Are You Willing to Submit a Pull Request? Yes. -- 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]
