Frun1na opened a new pull request, #4921:
URL: https://github.com/apache/rocketmq-dashboard/pull/4921
### Which Issue(s) This PR Fixes
- Fixes #(issue to be linked)
### Brief Description
`finishStream` cleared `pendingUserMessage` unconditionally after a
successful timeline refetch. The refetch succeeding does not imply the
transcript gained the user row: when the stream failed **before** the
`run_started` frame (connection refused, 401, 409 from a second tab) the run
was never admitted, so clearing the optimistic copy made the operator's
question vanish without a trace. The hook now tracks admission via the
`run_started` frame and only drops the pending bubble when the run was admitted
(or the stream ended cleanly). The code's own comment already stated the
invariant - "the transcript never got the row" - but the refetch-success branch
did not honour it.
### How Did You Test This Change?
```
cd web && npx vitest run src/pages/ai/hooks/useAgentRun.test.ts
Test Files 1 passed (1)
Tests 16 passed (16)
```
--
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]