fix(omnichannel): wrap transfer comment to multiple lines (#26723)#39254
fix(omnichannel): wrap transfer comment to multiple lines (#26723)#39254ShreyaRHipparagi wants to merge 1 commit intoRocketChat:developfrom
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 |
|
|
|
WalkthroughThe changes add CSS styling properties ( Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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.
🧹 Nitpick comments (1)
apps/meteor/client/views/omnichannel/contactHistory/MessageList/ContactHistoryMessage.tsx (1)
74-74: LGTM with optional formatting suggestion.The styling fix correctly addresses text wrapping for
livechat-closemessages, consistent with the approach inSystemMessage.tsx. The line is quite long; consider splitting it for improved readability.,
🧹 Optional: Split long line for readability
- <MessageSystemBody title={message.msg} wordBreak='break-word' style={{ whiteSpace: 'pre-wrap' }}>{t('Conversation_closed', { comment: message.msg })}</MessageSystemBody> + <MessageSystemBody title={message.msg} wordBreak='break-word' style={{ whiteSpace: 'pre-wrap' }}> + {t('Conversation_closed', { comment: message.msg })} + </MessageSystemBody>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/meteor/client/views/omnichannel/contactHistory/MessageList/ContactHistoryMessage.tsx` at line 74, The MessageSystemBody JSX line is too long and should be split for readability; refactor the render in ContactHistoryMessage.tsx by breaking the props onto separate lines and placing the translated children on its own line (identify the MessageSystemBody element and the props title, wordBreak, style and the t('Conversation_closed', { comment: message.msg }) child) so the JSX is easier to read while keeping the same props and behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@apps/meteor/client/views/omnichannel/contactHistory/MessageList/ContactHistoryMessage.tsx`:
- Line 74: The MessageSystemBody JSX line is too long and should be split for
readability; refactor the render in ContactHistoryMessage.tsx by breaking the
props onto separate lines and placing the translated children on its own line
(identify the MessageSystemBody element and the props title, wordBreak, style
and the t('Conversation_closed', { comment: message.msg }) child) so the JSX is
easier to read while keeping the same props and behavior.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/meteor/client/components/message/variants/SystemMessage.tsxapps/meteor/client/views/omnichannel/contactHistory/MessageList/ContactHistoryMessage.tsx
📜 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)
- GitHub Check: cubic · AI code reviewer
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation
Files:
apps/meteor/client/components/message/variants/SystemMessage.tsxapps/meteor/client/views/omnichannel/contactHistory/MessageList/ContactHistoryMessage.tsx
🧠 Learnings (6)
📓 Common learnings
Learnt from: ggazzo
Repo: RocketChat/Rocket.Chat PR: 35995
File: apps/meteor/app/api/server/v1/rooms.ts:1107-1112
Timestamp: 2026-02-23T17:53:18.785Z
Learning: In Rocket.Chat PR reviews, maintain strict scope boundaries—when a PR is focused on a specific endpoint (e.g., rooms.favorite), avoid reviewing or suggesting changes to other endpoints that were incidentally refactored (e.g., rooms.invite) unless explicitly requested by maintainers.
📚 Learning: 2026-02-24T19:36:55.089Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/page-objects/fragments/home-content.ts:60-82
Timestamp: 2026-02-24T19:36:55.089Z
Learning: In RocketChat/Rocket.Chat e2e tests (apps/meteor/tests/e2e/page-objects/fragments/home-content.ts), thread message preview listitems do not have aria-roledescription="message", so lastThreadMessagePreview locator cannot be scoped to messageListItems (which filters for aria-roledescription="message"). It should remain scoped to page.getByRole('listitem') or mainMessageList.getByRole('listitem').
Applied to files:
apps/meteor/client/components/message/variants/SystemMessage.tsxapps/meteor/client/views/omnichannel/contactHistory/MessageList/ContactHistoryMessage.tsx
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.
Applied to files:
apps/meteor/client/components/message/variants/SystemMessage.tsxapps/meteor/client/views/omnichannel/contactHistory/MessageList/ContactHistoryMessage.tsx
📚 Learning: 2026-02-24T19:16:35.307Z
Learnt from: sampaiodiego
Repo: RocketChat/Rocket.Chat PR: 39003
File: apps/meteor/client/lib/chats/flows/sendMessage.ts:39-45
Timestamp: 2026-02-24T19:16:35.307Z
Learning: In apps/meteor/client/lib/chats/flows/sendMessage.ts, when sdk.call('sendMessage', ...) throws an error, the message is intentionally left with temp: true (not deleted or cleaned up) to support a future retry UI feature. This allows users to retry sending failed messages rather than losing them.
Applied to files:
apps/meteor/client/components/message/variants/SystemMessage.tsx
📚 Learning: 2026-01-17T01:51:47.764Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 38219
File: packages/core-typings/src/cloud/Announcement.ts:5-6
Timestamp: 2026-01-17T01:51:47.764Z
Learning: In packages/core-typings/src/cloud/Announcement.ts, the AnnouncementSchema.createdBy field intentionally overrides IBannerSchema.createdBy (object with _id and optional username) with a string enum ['cloud', 'system'] to match existing runtime behavior. This is documented as technical debt with a FIXME comment at apps/meteor/app/cloud/server/functions/syncWorkspace/handleCommsSync.ts:53 and should not be flagged as an error until the runtime behavior is corrected.
Applied to files:
apps/meteor/client/components/message/variants/SystemMessage.tsx
📚 Learning: 2025-12-18T15:18:31.688Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37773
File: apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx:24-34
Timestamp: 2025-12-18T15:18:31.688Z
Learning: In apps/meteor/client/views/mediaCallHistory/MediaCallHistoryInternal.tsx, for internal call history items, the item.contactId is guaranteed to always match either the caller.id or callee.id in the call data, so the contact resolution in getContact will never result in undefined.
Applied to files:
apps/meteor/client/views/omnichannel/contactHistory/MessageList/ContactHistoryMessage.tsx
🔇 Additional comments (1)
apps/meteor/client/components/message/variants/SystemMessage.tsx (1)
90-97: LGTM!The conditional spread pattern correctly applies the text-wrapping styles only to
livechat_transfer_historymessages. The combination ofwordBreak: 'break-word'andwhiteSpace: 'pre-wrap'appropriately addresses the overflow issue while preserving existing accessibility attributes.
Proposed changes
This PR fixes an issue where long omnichannel transfer comments are not properly wrapped to multiple lines, resulting in text bleeding out of the boundaries or being hidden behind ellipsis in the chat history.
I modified the SystemMessage component for
livechat_transfer_historyand ContactHistoryMessage forlivechat-closeto includeword-break: break-wordandwhite-space: pre-wrap, ensuring that comments explicitly wrap within the message constraints.Issue(s)
Fixes #26723
Steps to test or reproduce
Further comments
Tested locally by inspecting the updated components with React Fuselage components.
Summary by CodeRabbit