You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Frun1na (via GitHub)" <gi...@apache.org> on 2026/09/21 07:00:33 UTC

[I] [Bug] Switching conversation attaches the previous conversation's live run to the one on screen [rocketmq-dashboard]

Frun1na opened a new issue, #4697:
URL: https://github.com/apache/rocketmq-dashboard/issues/4697

   ### Before Creating the Bug Report
   
   - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate.
   
   - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository.
   
   - [x] I can reproduce this on the current `master` branch, or I have stated the exact version I am running below.
   
   
   ### Studio Version
   
   branch: rocketmq-studio
   git commit id: 7ce9a68215c4cd1c7025013d02135b43b6aa6ba1
   deployed as: built from source (`cd server && mvn -B -ntp package -DskipTests`)
   
   ### Runtime Environment
   
   OS: Windows 11 with WSL2 (Ubuntu 24.04.3 LTS)
   MySQL: 8.0.36, container from `deploy/docker-compose.yml`
   browser: Chrome 141
   
   ### Connected RocketMQ Cluster
   
   Not involved: the defect is in the AI page's client-side run handling, verified with Vitest and a mocked timeline endpoint.
   
   ### Build Toolchain
   
   Node.js 20.19.0, npm 10.8.2
   
   ### Describe the Bug
   
   Generation belongs to the run, not to the HTTP connection, so the timeline reports the run still streaming as `activeRun` and the AI page re-attaches to it. `useConversationTimeline` kept that run without recording which conversation it came from — and replacing it requires a refetch, which is asynchronous.
   
   So after the user switches away from a generating conversation, `activeRun` is still the previous conversation's run for at least one commit. `useActiveRunAttach`'s effect re-runs in exactly that commit: `useAgentRun`'s abort-on-conversation-change re-renders, and the effect that clears the one-attempt marker runs first in the same commit. The effect then calls `attach(conversationId, previousRunId, lastSeq)` with the new conversation id.
   
   Two things let it through rather than catching it. `startStream` refuses a stream whose frames belong to another conversation, but it compares against `conversationIdRef`, which the earlier effect in the same commit has already updated to the new conversation. And the attach endpoint (`POST /api/ai/runs/{runId}/stream`) is addressed by run id alone, so there is nothing server-side to reject it either.
   
   The result is that the previous conversation's run is attached to the conversation on screen: its live frames are folded into the wrong transcript, and the stop button acts on that run while the user believes they are looking at a different conversation.
   
   ### Steps to Reproduce
   
   1. Open a conversation that is currently generating (send a message and leave it running).
   2. Switch to another conversation from the list.
   3. Observe the new conversation's transcript: the previous run's frames are appended to it.
   
   ### What Did You Expect to See?
   
   The new conversation attaches only its own active run, if it has one. While that conversation's timeline has not loaded yet, the page has no active run to attach, and it should not attach anything.
   
   ### What Did You See Instead?
   
   The previous conversation's run is attached to the new one and its frames render under the wrong transcript.
   
   ### Additional Context
   
   I have a fix ready: PR #4696.
   
   ### Are You Willing to Submit a Pull Request?
   
   - [x] Yes, I am willing to submit a pull request.
   


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Switching conversation attaches the previous conversation's live run to the one on screen [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed issue #4697: [Bug] Switching conversation attaches the previous conversation's live run to the one on screen
URL: https://github.com/apache/rocketmq-dashboard/issues/4697


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Switching conversation attaches the previous conversation's live run to the one on screen [rocketmq-dashboard]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #4697:
URL: https://github.com/apache/rocketmq-dashboard/issues/4697#issuecomment-5756681398

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   This is a valid state management bug. When switching conversations, the previous conversation's live run is incorrectly attached to the new conversation context.
   
   **Root Cause:** The conversation switch handler does not properly detach the live run subscription from the previous conversation before mounting the new one. The live run state leaks across conversation boundaries.
   
   **Impact:** Users see stale live run data from a previous conversation after switching. This can cause confusion and potentially incorrect operations if the live run is interacted with.
   
   **Severity:** Medium — affects UX correctness in multi-conversation workflows.
   
   PR #4696 addresses this. The fix should ensure live run state is fully reset on conversation switch.
   
   ---
   *Automated evaluation by RockteMQ-AI*
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] Switching conversation attaches the previous conversation's live run to the one on screen [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins commented on issue #4697:
URL: https://github.com/apache/rocketmq-dashboard/issues/4697#issuecomment-5761006174

   Resolved by #4696 (merged into rocketmq-studio as 930e27df5).


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org