feat(Lightspeed): Add stop button to interrupt a streaming conversation#2587
feat(Lightspeed): Add stop button to interrupt a streaming conversation#2587karthikjeeyar wants to merge 3 commits intoredhat-developer:mainfrom
Conversation
Changed Packages
|
Review Summary by QodoAdd stop button to interrupt streaming conversations
WalkthroughsDescription• Add interrupt endpoint to stop streaming conversations • Implement stop button UI with request tracking • Add auto-refetch for conversations with pending topic summaries • Prevent sending empty messages on Enter key press Diagramflowchart LR
UI["Stop Button in UI"]
Hook["useStopConversation Hook"]
Client["LightspeedApiClient.stopMessage"]
Backend["Backend /v1/query/interrupt"]
Core["Lightspeed-Core Server"]
UI -- "triggers" --> Hook
Hook -- "calls" --> Client
Client -- "POST request" --> Backend
Backend -- "forwards" --> Core
Core -- "interrupts stream" --> Backend
Backend -- "returns success" --> Client
File Changes1. workspaces/lightspeed/plugins/lightspeed-backend/__fixtures__/lcsHandlers.ts
|
Code Review by Qodo
1.
|
workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx
Show resolved
Hide resolved
baef089 to
2b7da0d
Compare
|
@aprilma419 I am now retaining the last used query if the conversation is interrupted. For the partial response, we will have a followup PR in LCORE to support it. |
Jdubrick
left a comment
There was a problem hiding this comment.
small nit, generally lgtm though
workspaces/lightspeed/plugins/lightspeed-backend/src/service/router.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Screen.Recording.2026-03-26.at.2.36.51.PM.mov
Works as expected, But One small observation —when a conversation gets interrupted, the side panel shows a loading icon. It feels a bit odd; I would like more clarity or feedback there.
Even after you continue the conversation in the same chat, it remains the same in the side panel

|
To @HusneShabbir 's point, instead of the loader icon, if feasible, we can show a skeleton loading state. |
yangcao77
left a comment
There was a problem hiding this comment.
generally lgtm from backend perspective. I will hold off the lgtm label and wait for frontend side approval as well.
I assume you are not running LCORE from my Open LCORE PR (that adds the async topic_summary), thats why you are seeing the loading spinner always. Refer to the "How to test" section in this PR description and checkout to my open PR and run the LCORE to see the topic summary eventually. |
2b7da0d to
fdebc96
Compare
@aprilma419 I too thought about this while implementing, but chatbot uses PF's Menu item from react-core under the hood. Unfortunately, it doesn't support skeletons for loading state, hence I have added loading icon. |
fdebc96 to
afccc2a
Compare
|





Hey, I just made a Pull Request!
Fixes:
https://redhat.atlassian.net/browse/RHIDP-12490
https://redhat.atlassian.net/browse/RHDHBUGS-2745
This PR contains the following changes:
Enterwith a emtpy stringLightspeed_stop_button.mov
How to test:
✔️ Checklist