Conversation
## Problem Posting a long link that a text formatter cannot break up (e.g. a URL with a very long unbroken segment) stretched the message bubble wider than other bubbles. PR #209 added `break-words` (overflow-wrap: break-word) on the prose body, but `break-word` only inserts soft breaks when a word would otherwise overflow, and crucially does NOT lower the element's min-content size. So a sibling flex/grid parent can still be forced wider by the intrinsic min-content of a long token. ## Approach Replace `break-words` with `[overflow-wrap:anywhere]`. `anywhere` is a strict superset of `break-word`: it keeps the soft-break behavior but also lowers the element's min-content to a single character, allowing the bubble's flex ancestors to shrink around the wrapped content. ## Testing - Added example-data entry with a long unbreakable URL so the regression is visually exercised by the dev build and by Playwright. - Added a Playwright regression test (#212) that asserts a bubble containing the long URL stays within the viewport at narrow widths. - Full `message-layout.spec.ts` suite (7 tests) passes on chromium. Closes #212 [AI-assisted - Claude]
Addresses testing-reviewer feedback on PR #213. The original assertion (`bubbleWidth <= 480`) was too loose to distinguish the fixed and buggy states. Replace with three stricter checks: 1. Inner prose `.scrollWidth <= .clientWidth` — verifies the long URL actually wraps inside its container rather than overflowing. 2. Rendered `<a>` element width fits within the prose box. 3. `document.documentElement.scrollWidth <= .clientWidth` — defense in depth against the long-URL bubble pushing the chat column wider than siblings. Tests run at 1024x900 where `max-w-prose` (~65ch ≈ 520px) is the binding constraint rather than the viewport. Verified full `message-layout.spec.ts` suite (7 tests) passes on chromium and the new test passes on webkit as well. [AI-assisted - Claude]
Review feedback addressedRan four internal review agents plus Actioned (3258ed4): Testing reviewer flagged the Playwright assertion as too loose. Tightened to three stricter checks:
Test now runs at 1024×900 where Caveat worth flagging: I could not reliably reproduce the exact regression from the issue screenshot locally with either Other findings (not blocking):
[AI-assisted - Claude] |
Problem
Posting a long link that a text formatter cannot break up (e.g. a URL with a very long unbroken segment) stretched the message bubble wider than other bubbles. PR #209 added
break-words(overflow-wrap: break-word) on the prose body, butbreak-wordonly inserts soft breaks when a word would otherwise overflow, and crucially does NOT lower the element's min-content size. So a sibling flex/grid parent can still be forced wider by the intrinsic min-content of a long token.Approach
Replace
break-wordswith[overflow-wrap:anywhere].anywhereis a strict superset ofbreak-word: it keeps the soft-break behavior but also lowers the element's min-content to a single character, allowing the bubble's flex ancestors to shrink around the wrapped content.Testing
message-layout.spec.tssuite (7 tests) passes on chromium locally.Closes #212
[AI-assisted - Claude]