Repository navigation
fix(sms): keep line breaks in conversation bubbles - #228
Conversation
Message bubbles used the default white-space, so the line breaks in a received SMS (and in one the user typed with Enter) were folded into spaces. Notifications already show them, since the stored text keeps them. Use whitespace-pre-wrap and break-words on the bubble. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
SMS conversation bubbles in the web UI collapse line breaks into spaces. A message such as
shows as one run-on paragraph. Outgoing messages typed with Enter in the composer are shown the same way. The stored text does keep the line breaks: the push notifications for the same message (built from the same content) show them correctly.
Cause
The bubble in
web/src/components/sms/ThreadPanel.tsxrenders the text with the defaultwhite-space: normal, which folds\ninto a space.Fix
Add
whitespace-pre-wrap break-wordsto the bubble.pre-wrapkeeps the sender's line breaks while still wrapping long lines;break-wordsstops long unbroken strings (URLs, codes) from overflowing the bubble. One line changed.Testing
cd web && npm test: 47/47 pass.cd web && npm run build: type-check and build pass, and.whitespace-pre-wrapis in the generated CSS.🤖 Generated with Claude Code
Summary by CodeRabbit