feat(lightspeed): add Sources chip + popover for notebook context#3672
Conversation
Replace the inline SourcesCard with a compact chip button that opens a PatternFly Popover showing source documents with FileTypeIcon badges. Scoped to Notebook view only; general chat retains the original display. Includes i18n translations for all 5 languages, unit tests, and consistent source document handling during streaming. Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3672 +/- ##
==========================================
+ Coverage 54.12% 54.17% +0.04%
==========================================
Files 2344 2346 +2
Lines 89539 89631 +92
Branches 25026 25063 +37
==========================================
+ Hits 48460 48554 +94
+ Misses 39517 39515 -2
Partials 1562 1562
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
@HusneShabbir Lets firstly wait for @ShiranHi feedback, then only go for go for testing it. There are differences wrt to prototype like we are using PF popups and tried not overriding it much to look exactly as our prototype. Secondly in RHDH 2.1 we will not have the document summary, so we will be only showing documents name, that's why I added the lines between each doscuments. |
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 9:07 AM UTC · Completed 9:21 AM UTC |
ReviewFindingsMedium
Low
|
|
Thank you @its-mitesh-kumar, looks good to me. I understand that we are unable to remove the border line between each result or change the 'i' icon from purple to gray. If that’s a constraint, I am completely fine with this implementation. Thank you! |
We can remove the border line between each result. I did introduced it knowingly to look better. In 2.1 we will be only having only document name. Let me know your preference. S_.2026-07-03.at.1.03.36.PM.mov
We can change the 'i' icon from purple to gray. I made it purple since to me its look better particularly in light theme. Let me know your preference. |
|
@ShiranHi Made both changes now Light Theme
Dark Theme
Cc: @HusneShabbir |
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
@HusneShabbir this close icon is coming from PF popover. So lets not try to override it. |
|
cc: @ShiranHi |
@its-mitesh-kumar do we have a bug ticket for this issue? It affects MCP config modal icons too, the x icon and key icon. We need to find a universal fix for this. |
ciiay
left a comment
There was a problem hiding this comment.
Thanks for the pr 👏 Mostly looks good to me, only left a couple nit comments. Also it might be worth adding a LightspeedChatBox test with useSourcesChipModal and updating the Message mock to render extraContent.endContent.
@ciiay Since its PF close icon only. So lets use this only. At other places if we are importing close icon from MUI or somewhere else we can change that and use PF close icon throughout lightspeed. |
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
|







Description
Replace the inline SourcesCard in the Notebook view with a compact "N Sources" chip button that opens a PatternFly Popover displaying source documents. Each source is shown with a colored FileTypeIcon badge and optional description summary. This change is scoped exclusively to the Notebook context — the general chat view retains its original inline sources display.
Also consolidates source document handling during streaming to use the shared
transformDocumentsToSourcesutility for consistency, and adds i18n translations for all 5 supported languages (Japanese, French, German, Spanish, Italian).Fixed
UI after changes
S_.2026-07-03.at.1.02.25.PM.mov
S_.2026-07-03.at.1.03.36.PM.mov
S_.2026-07-03.at.1.04.11.PM.mov
S_.2026-07-03.at.2.11.46.PM.mov
✔️ Checklist