Frun1na opened a new issue, #4614: URL: https://github.com/apache/rocketmq-dashboard/issues/4614
**Studio Version** branch: `rocketmq-studio` git commit id: `5b761df8` (#4606) **Runtime Environment** UI issue, verified at the unit level (see below) on the current `rocketmq-studio` branch; browser-independent. **Connected RocketMQ Cluster** Not cluster-specific: the defect is in the AI conversation client state handling. **Describe the Bug** After a page reload or reconnect while an AI run is streaming, the client reattaches to the live run but can never stop it: 1. On attach, the server replays persisted events. The live event vocabulary starts at `run_started` — the replay projects a run row into no `run_started` live event, so the reattaching client never receives one. 2. `useAgentRun` only learns the run id from the `run_started` frame (`runIdRef.current = event.runId`), and `attach()` discards the run id its caller passes in. 3. The composer renders the stop state from `isStreaming`, so the button looks and behaves as clickable — but `stop()` returns immediately when the run id is null. 4. For the same reason `reportRunSpeed` is silently skipped on a reattached run. `stop()`'s comment claims the button "stays disabled until then (`canStop`)", but `canStop` is not consumed by the composer's stop-state computation, so nothing disables the button. **Steps to Reproduce** 1. Send a message in an AI conversation so a run starts streaming. 2. Reload the page while the run is still generating; the client reattaches and the transcript keeps updating. 3. Click the stop button and observe nothing happens; the run keeps streaming until it finishes on its own. **What Did You Expect to See?** Clicking stop on a reattached run stops the run (`POST` stop reaches the API with the run id) and the button enters the stopping state. **What Did You See Instead?** The stop call is a client-side no-op (`runIdRef` is null, `stop()` returns before the API call); streaming continues. **Additional Context** Reproduced at the unit level in `web/src/pages/ai/hooks/useAgentRun.test.ts`: a new test that attaches and then calls `stop()` fails on `5b761df8` (`canStop` stays false, `stopRun` never called). A fix is proposed in #4613: seed the hook's run id from the id `attach()` already receives. -- 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]
