Repository navigation
Fix Studio user-message overflow for long unbroken text - #7100
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the UserMessage component in thread.tsx by adding the max-w-full class to the user message content container, ensuring that the message bubble does not exceed its parent container's width. There are no review comments, and I have no additional feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Caps Studio user message bubbles so long unbroken strings (paths/URLs/hashes) can’t expand beyond the existing max-w-[80%] wrapper, while preserving w-fit behavior for short messages.
Changes:
- Add a
max-w-fullconstraint to the user-message content element to prevent intrinsic width overflow for unbroken text.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Confirmed this live in Studio: pasting 5,000 unbroken characters on main blows the bubble out sideways, and the same paste on your branch wraps inside a normal-width bubble, with short messages still snug. Also measured the compiled CSS in headless Chrome to pin the mechanism: main sizes the bubble to 40,032px inside a 640px wrapper, and max-w-full caps it at exactly 640px. This bubble is the only w-fit element in the file, so the assistant message and edit composer never had the bug. Mirror CI: oobabooga#49, all green after one Chat UI Tests job wedged at its final shutdown step and passed on rerun (known flake). Merging now. |
Summary
max-w-[80%]wrapper.w-fitsizing for short messages and the existing wrapping behavior for normal prose.This may address one contributing cause of #7068; the broader issue should remain open for further investigation.
Root cause
The user bubble combined
w-fitwithoverflow-wrap: break-wordbut had no maximum width.break-worddoes not constrain intrinsic width, so a long unbroken path, URL, hash, or console value could make the right-aligned bubble thousands of pixels wider than its wrapper. Addingmax-w-fullsupplies the missing hard cap while allowing the existing wrapping rule to break the text inside that finite width.Scope and risk
The change adds one Tailwind class to the user-message content element. Short messages remain content-sized, while long messages cannot exceed the existing wrapper. No assistant-message or thread-viewport classes are touched.
Validation
All commands above pass; the focused test run reports 18 passed.
npm run lintwas also run and reports 449 pre-existing repository diagnostics unrelated to the changed line.