Repository navigation
fix(web): style think/retrieving blocks in floating chat widget - #18512
Conversation
The widget markdown wrapper referenced the class name as a plain string while the stylesheet is a CSS module, so the hashed class never matched and none of the rules applied. Bind the wrapper to the module class and add details.think / details.retrieving rules so reasoning blocks are visually distinct from the answer body, matching next-markdown-content. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe floating chat widget now uses its scoped CSS-module root class. New styles define spacing, typography, hover behavior, selection behavior, and distinct borders for expandable thinking and retrieving sections. ChangesFloating Chat Widget
Merge Risk: 🔵 Low · up to The PR makes reasoning blocks use the CSS-module styling and visually separates them from answer content. The summary color depends on the exact format of the --text-secondary token; if it is not confirmed, that color may fail to render correctly. This is a bounded follow-up rather than a release-blocking issue. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
wangq8
left a comment
There was a problem hiding this comment.
Thanks for the fix — the root cause is correctly identified: the wrapper referenced the class name as a plain string while the stylesheet is a CSS module, so the hashed class never matched and none of the module rules applied. Binding it to styles['floating-chat-widget'] is correct and consistent with the existing styles.referenceIcon usage, and the new :global(details.think) / :global(details.retrieving) rules match the pattern already used in next-markdown-content/index.module.less.
One follow-up worth addressing (same root cause, still in this file):
.widget-citation-contentis still referenced as a plain string (className="flex gap-2 widget-citation-content"at line ~190 offloating-chat-widget-markdown.tsx), and.widget-citation-popoveris defined in the module but never bound tostyles[...]. Both are CSS-module classes, so those rules (word-break/overflow-wrap, popover sizing) remain ineffective for the same reason this PR fixes. Consider binding those tostyles[...]too, here or in a follow-up.
Minor style nit (non-blocking): the new rules use padding-inline-start: 0px, whereas next-markdown-content uses 10px between the border and the text. With 0px the text sits flush against the border-inline-start. Just confirming that's the intended look for the compact widget.
Summary
fix(web): style think/retrieving blocks in floating chat widget
The widget markdown wrapper referenced the class name as a plain string while the stylesheet is a CSS module, so the hashed class never matched and none of the rules applied. Bind the wrapper to the module class and add details.think / details.retrieving rules so reasoning blocks are visually distinct from the answer body, matching next-markdown-content.