Skip to content

fix(web): style think/retrieving blocks in floating chat widget - #18512

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/widget-markdown-think-style
Aug 19, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/widget-markdown-think-style

Conversation

@dcc123456

Copy link
Copy Markdown
Collaborator

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.

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]>
@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. 🧰 typescript Pull requests that update Typescript code labels Aug 19, 2026
@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 26ffe7a7-f2ae-4e62-bc24-e049399e12bf

📥 Commits

Reviewing files that changed from the base of the PR and between 9e913c3 and b850913.

📒 Files selected for processing (2)
  • web/src/components/floating-chat-widget-markdown.module.less
  • web/src/components/floating-chat-widget-markdown.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Floating Chat Widget

Layer / File(s) Summary
Widget class and expandable section styling
web/src/components/floating-chat-widget-markdown.*
The root container now uses the scoped floating-chat-widget class. details.think and details.retrieving sections now have dedicated expandable styles.
Estimated code review effort: 1 (Trivial) ~5 minutes

Merge Risk: 🔵 Low · up to b8509

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: jinhai-cn, cike8899

Poem

A rabbit hops through styles so neat,
Think and retrieve now look complete.
Scoped classes guide the way,
Borders mark each thought display,
The chat widget shines today!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the primary change: styling think and retrieving blocks in the floating chat widget.
Description check ✅ Passed The description includes the required Summary section and clearly explains the styling issue, fix, and intended visual result.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dcc123456
dcc123456 requested a review from wangq8 August 19, 2026 08:42
@dcc123456 dcc123456 added the ci Continue Integration label Aug 19, 2026
@dcc123456
dcc123456 marked this pull request as draft August 19, 2026 08:43
@dcc123456
dcc123456 marked this pull request as ready for review August 19, 2026 08:43

@wangq8 wangq8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-content is still referenced as a plain string (className="flex gap-2 widget-citation-content" at line ~190 of floating-chat-widget-markdown.tsx), and .widget-citation-popover is defined in the module but never bound to styles[...]. 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 to styles[...] 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.

@wangq8
wangq8 merged commit a7f4083 into infiniflow:main Aug 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration size:S This PR changes 10-29 lines, ignoring generated files. 🧰 typescript Pull requests that update Typescript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants