Repository navigation
Conversation
Assistants routinely answer with GFM tables (e.g. price or option comparisons), which CommonMark alone leaves as raw pipe characters in the message bubble. Enable remark-gfm so tables, strikethrough, autolinks and task lists render. Tables sit in an overflow-x-auto wrapper because the bubble is capped at max-w-xs; cells use border-solid explicitly because the widget's CSS reset does not set a default border style, and task-list checkboxes opt back into appearance-auto because the reset strips input appearance. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
blaab2
added a commit
to blaab2/client-sdk-react
that referenced
this pull request
Sep 25, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Chat messages go through
react-markdown, but without any remark plugins, so only CommonMark renders. LLM assistants very often answer with GFM tables (price or option comparisons, for instance), and those currently show up in the bubble as raw| … | … |text. Strikethrough, autolinked bare URLs and task lists have the same problem.Change
remark-gfm(^4, the line that matchesreact-markdown^10) and pass it asremarkPluginsinMarkdownMessage(src/components/widget/conversation/Message.tsx).tableis wrapped in anoverflow-x-autodiv, because the bubble is capped atmax-w-xsand wide tables would otherwise overflow the widget. Cells aretext-xswithborder-current, so they work in light and dark themes; header cells get the samebg-black bg-opacity-10tint that code blocks use. Column alignment from:---:is kept, because thestylereact-markdown sets is passed through.border-solid, because the widget's CSS reset sets no default border style (soborderalone renders nothing).appearance-auto, because the reset'sappearance: noneon inputs would otherwise make them invisible.del→line-through.Plain-CommonMark messages render exactly as before.
Tests
The existing embed specs never produce a message (that would need a live assistant), so there's no Playwright coverage for message rendering to extend. I checked it in a local harness that renders
ConversationMessagewith a 5-column table, strikethrough, a bare URL and a task list: all of them render, and the table scrolls horizontally inside a 384px widget.npm run lint,npm run type-check,npm run format:check,npm run build,npm run build:widgetandnpm run test:ciall pass.Related: #38 (localizable labels) — independent of this one; both apply cleanly on
main.🤖 Generated with Claude Code