Repository navigation
Show typed HTML literally in user message bubbles - #4553
Merged
Merged
Conversation
#4343 enabled allowHtml on the user bubble along with agent output, so user-typed tags like <details> and <b> rendered as elements. Agent output keeps sanitized HTML and <video>. Fixes #4546 Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/investigate-and-fix-issue-4546-thr_ec9zskjv5b
branch
September 30, 2026 16:01
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.
Human comments
What was wrong
#4343 added
allowHtmlto the conversationMarkdownPreviews so that agent-written<video>would render. One of those was the user message bubble (CollapsibleMessageText). Because of that, any user message containing<went through therehype-raw+rehype-sanitizepipeline, and typed tags like<details>,<b>and<img>rendered as real elements instead of the literal text. Before #4343, react-markdown turned those raw nodes into text.What changed
apps/app/src/components/thread/timeline/ConversationMessageContent.tsx: removedallowHtmlfrom the user bubble'sMarkdownPreview. User messages render Markdown as before and show HTML tags literally. Assistant and generated messages still render sanitized HTML and<video>.How you verified
ConversationMessageContent.test.tsxthat renders a user message containing<details><summary>x</summary>hidden</details>andinline <b>bold</b> here. It asserts that no<details>or<b>elements exist and that the tags appear as literal text. The test fails without the fix and passes with it.pnpm exec turbo run test --filter=@bb/app -- src/components/thread/timeline/ConversationMessageContent.test.tsx: 13/13 pass, including the assistant<video>routing and user image routing tests.pnpm exec turbo run typecheck lint --filter=@bb/app: passes, 0 errors.Fixes #4546
🤖 Generated with Claude Code