unbridled-41 opened a new issue, #5475: URL: https://github.com/apache/rocketmq-dashboard/issues/5475
### Studio Version branch: `rocketmq-studio` @ `6a68042f` (the revision verified; the branch is based on it) deployed as: built from source (unit test) ### Runtime Environment Not environment-specific: client re-attach state. ### Connected RocketMQ Cluster Not cluster-specific (AI runs). ### Describe the Bug Admission writes the run row as `QUEUED` and registers the worker only later, after `workspace.prepare` (whose CLI availability probe has a 5s budget). Reloading the page inside that window attaches to a run with no handle yet: the server cannot register the observer, the row's `QUEUED` status is non-terminal so no `RunFinished` is synthesised, and the stream closes with only `done` — a clean end for the client. The hook then marks the run id as attached for the rest of the visit, so the timeline's next fetch (same run, now `RUNNING`) cannot attach again. The answer streams with nobody watching, and admission refuses the next send with 409 until the operator navigates away and back. ### Steps to Reproduce 1. Start a run and reload the page while the run row is still `QUEUED` (before the CLI probe finishes). 2. Observe no streaming bubble and no error. 3. Try to send another message: 409 until the page is left and re-entered. ### What Did You Expect to See? The client attaches to the run once it becomes active, or reports that it could not. ### What Did You See Instead? The run's output is invisible and the conversation is locked. ### Evidence - `web/src/pages/ai/hooks/useActiveRunAttach.ts` (the per-visit guard), `ops/ai/conversation/AiRunService.java` (`attach` and the non-terminal handle-less path), `web/src/pages/ai/hooks/useAgentRun.ts` (the stream closing), `CliBinaryProbe` (the 5s budget). - `cd web && npx vitest run src/pages/ai` — the added case `reattachesWhenTheRunAdvancesPastTheAdmissionWindowItWasAttachedInTest` fails before the change (`expected "vi.fn()" to be called 2 times, but got 1 times`) and passes after (`Tests 195 passed`), also asserting that a repeated identical status does not loop. ### Impact The answer is invisible and the conversation is blocked with 409s until the operator leaves the page. ### Acceptance Criteria - A run that leaves the admission window is attached again; a repeated status still cannot hot-loop. - A regression test pins both. Related: #4614 (reconnect and stop semantics — adjacent, different defect). **Corresponding PR:** #5446 -- 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]
