fix(chat): wrap long unbroken strings inside chat bubble (#457) - #535
Closed
dolho wants to merge 1 commit into
Closed
fix(chat): wrap long unbroken strings inside chat bubble (#457)#535dolho wants to merge 1 commit into
dolho wants to merge 1 commit into
Conversation
Long URLs, base64 blobs, and inline code in chat responses pushed the agent detail page horizontally because text containers did not break unbreakable strings and `<pre>` blocks grew to intrinsic width. Add Tailwind classes on all three ChatBubble variants: - `[overflow-wrap:anywhere]` on text containers (wraps long strings) - `min-w-0` on bubble wrappers (so percent max-width clamps correctly) - `prose-pre:max-w-full prose-pre:overflow-x-auto prose-pre:whitespace-pre` (pre blocks scroll inside the bubble instead of pushing layout) - `prose-code:break-all prose-a:break-all` (inline code and links break at character boundaries) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Duplicates |
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.
Summary
<pre>blocks grew to their intrinsic width.ChatBubblevariants (user / assistant / self-task) so unbreakable strings wrap,<pre>blocks scroll inside the bubble, and inline code/links break at character boundaries.Closes #457.
Changes
src/frontend/src/components/chat/ChatBubble.vue:[overflow-wrap:anywhere]on text containers — wraps long strings (URLs, base64, paths).min-w-0on bubble wrappers — somax-w-[85%]actually clamps width when nested in flex parents.prose-pre:max-w-full prose-pre:overflow-x-auto prose-pre:whitespace-pre—<pre>blocks scroll horizontally inside the bubble instead of pushing layout.prose-code:break-all prose-a:break-all— inline code and links break at character boundaries.Pure CSS / template change. No logic changes, no markdown sanitization changes.
Test plan
Verified end-to-end via Playwright (UI agent) against
http://localhost:8001:word-break: break-allon<a><pre>block (2703px content) scrolls inside bubble (overflowX:auto); wrapperscrollWidth == clientWidth<code>wraps viaword-break: break-alldocScrollWidth == docClientWidth == 1280)ChatBubble.vuecompilationManual visual verification: open agent detail → Chat tab on a running agent, paste a long URL + 200-char base64 string, confirm the page does not scroll horizontally and the bubble stays inside its column.
🤖 Generated with Claude Code