fix(ui): prevent message overflow and ensure proper text wrapping in chat UI#39984
fix(ui): prevent message overflow and ensure proper text wrapping in chat UI#39984thekailashparihar wants to merge 1 commit into
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (7)📓 Common learnings📚 Learning: 2026-02-25T20:10:16.987ZApplied to files:
📚 Learning: 2026-02-10T16:32:42.586ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2025-11-19T18:20:07.720ZApplied to files:
📚 Learning: 2026-02-24T19:36:55.089ZApplied to files:
🔇 Additional comments (3)
WalkthroughA new CSS file is added to fix text wrapping and overflow behavior for message UI elements, and is imported during client startup to apply these styles globally without modifying runtime logic. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Stylelint (17.5.0)apps/meteor/client/styles/custom.cssConfigurationError: Could not find "stylelint-order". Do you need to install the package or use the "configBasedir" option? Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d0c8df3b2c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .rcx-message-body--clamp { | ||
| display: block !important; | ||
| line-clamp: unset !important; | ||
| -webkit-line-clamp: unset !important; | ||
| overflow: visible !important; |
There was a problem hiding this comment.
Scope clamp override to thread preview only
This rule removes clamping for every MessageBody that uses the shared .rcx-message-body--clamp class, not just thread preview, because line-clamp/-webkit-line-clamp are unset with !important globally. Components that intentionally rely on MessageBody clamp={2} (for example apps/meteor/client/views/room/contextualBar/Threads/components/ThreadListMessage.tsx:71 and apps/meteor/client/views/room/contextualBar/Discussions/components/DiscussionsListItem.tsx:61) will now render full text, which can make long messages expand list rows and degrade the contextual bar layout.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Thanks for the review.
You're right — the current implementation removes clamping globally, which may affect components relying on it.
I will update the selector to scope the override specifically to thread preview components to avoid unintended side effects.
Problem
Long text such as URLs, email addresses, and continuous strings without spaces was not wrapping correctly in chat messages and omnichannel transfer comments. This caused the message container to overflow and break the layout, especially in thread previews and omnichannel transfer scenarios.
Related issue: #26723
Solution
overflow-wrap: break-wordword-break: break-word-webkit-line-clampbehavioroverflowto visible where necessaryTesting
The fix was verified with the following cases:
In all scenarios, text wraps correctly within the container without breaking the layout.
Notes
Summary by CodeRabbit