feat(chat-messages): add citation popover#2126
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new si-citation-pill component to display inline source citations within AI-generated chat messages, supporting pre-segmented annotated text (SiChatAnnotatedText). Feedback on these changes focuses on ensuring citation pills flow inline by removing trailing line breaks, adhering to strict type checking for the label input, and avoiding hardcoded user-facing strings to support internationalization. Additionally, recommendations are made to improve Server-Side Rendering (SSR) compatibility by avoiding direct window references, and to prevent memory leaks by properly tracking and disconnecting the MutationObserver on component destruction.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
89ac9f7 to
698a226
Compare
698a226 to
5489317
Compare
5489317 to
b6daf80
Compare
Related to #2064
Depends on #2099 to be merged first.
This branch adds a hover-triggered popover to SiCitationPillComponent that shows the citation's title, an optional description, and a "View source" link. Placement adapts to available viewport space, and a short hide delay keeps the popover open when moving the cursor onto it. The hover logic had to be wired manually because SiPopoverDirective does not support hover triggers, unlike the deprecated SiPopoverLegacyDirective which did. A follow-up worth considering is either adding hover trigger support to SiPopoverDirective or using SiTooltipDirective, which already handles this natively.
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: