Skip to content

fix: fix truncation of Livechat transfer comments#40363

Open
TasfinMahmud wants to merge 3 commits intoRocketChat:developfrom
TasfinMahmud:fix/livechat-transfer-comment-wrapping
Open

fix: fix truncation of Livechat transfer comments#40363
TasfinMahmud wants to merge 3 commits intoRocketChat:developfrom
TasfinMahmud:fix/livechat-transfer-comment-wrapping

Conversation

@TasfinMahmud
Copy link
Copy Markdown

@TasfinMahmud TasfinMahmud commented May 1, 2026

Proposed changes (including videos or screenshots)

This PR fixes issue #26723 where Livechat transfer comments are truncated with an ellipsis. It introduces a properly-scoped CSS fix using the data-system-message-type attribute selector (livechat_transfer_history and livechat_transfer_history_fallback) to allow the MessageSystemBody text to wrap across multiple lines without globally overriding the system message styles.

Issue(s)

Closes #26723

Type of change

  • Bug Fixes
  • New Features
  • Dependencies
  • Blueprints

Checklist

  • I have read the CONTRIBUTING doc
  • - [x] I have signed the CLA
    Lint and unit tests pass locally with my changes
    I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • Bug Fixes
    • Fixed truncation of Livechat transfer comments, allowing full text to display properly without being cut off or wrapped incorrectly.

@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot Bot commented May 1, 2026

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 1, 2026

🦋 Changeset detected

Latest commit: b51b033

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/server-fetch Patch
@rocket.chat/ui-video-conf Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 1, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

Walkthrough

Adds a changeset declaring a patch for @rocket.chat/meteor and CSS overrides to stop truncating Livechat transfer comments, allowing multi-line wrapping for livechat_transfer_history and livechat_transfer_history_fallback system messages.

Changes

Livechat transfer comment wrap fix

Layer / File(s) Summary
Release metadata
.changeset/fix-livechat-transfer-comment-wrap.md
Adds a changeset declaring a patch release for @rocket.chat/meteor describing the fix for transfer comment truncation.
Styling / Display
apps/meteor/app/theme/client/main.css
Overrides .rcx-message-system__body for data-system-message-type="livechat_transfer_history" and ..._fallback" to use white-space: normal, overflow: visible, text-overflow: unset, and overflow-wrap: break-word; updates .rcx-message-system__block to flex-wrap: wrap and align-items: flex-start to allow multi-line display.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

type: bug

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The pull request successfully addresses issue #26723 by implementing targeted CSS rules to prevent truncation and enable text wrapping for Livechat transfer comments, meeting the core requirement that transfer comment text wraps to multiple lines.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the Livechat transfer comment truncation issue: a changeset declaration and targeted CSS modifications for the specific message types mentioned in issue #26723.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The pull request title clearly summarizes the main change: fixing truncation of Livechat transfer comments, which is the primary objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
apps/meteor/app/theme/client/main.css (1)

19-26: ⚡ Quick win

Consider overflow-wrap: break-word; for better readability.

The current overflow-wrap: anywhere; breaks words at arbitrary character positions, which can reduce readability. Using overflow-wrap: break-word; instead will wrap text while preferring to break at word boundaries, only breaking within words when absolutely necessary.

Additionally, word-break: normal; is the default value and may be redundant unless you're explicitly overriding an inherited style.

♻️ Suggested refinement
 [data-system-message-type="livechat_transfer_history"] .rcx-message-system__body,
 [data-system-message-type="livechat_transfer_history_fallback"] .rcx-message-system__body {
 	white-space: normal;
 	overflow: visible;
 	text-overflow: unset;
-	overflow-wrap: anywhere;
-	word-break: normal;
+	overflow-wrap: break-word;
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/app/theme/client/main.css` around lines 19 - 26, The current rule
for [data-system-message-type="livechat_transfer_history"]
.rcx-message-system__body and
[data-system-message-type="livechat_transfer_history_fallback"]
.rcx-message-system__body uses overflow-wrap: anywhere which forces arbitrary
character breaks; change it to overflow-wrap: break-word to prefer word-boundary
wrapping and remove the redundant word-break: normal declaration (or keep only
if intentionally overriding an inherited rule) so the styles favor readability.
🤖 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/app/theme/client/main.css`:
- Around line 19-26: The current rule for
[data-system-message-type="livechat_transfer_history"] .rcx-message-system__body
and [data-system-message-type="livechat_transfer_history_fallback"]
.rcx-message-system__body uses overflow-wrap: anywhere which forces arbitrary
character breaks; change it to overflow-wrap: break-word to prefer word-boundary
wrapping and remove the redundant word-break: normal declaration (or keep only
if intentionally overriding an inherited rule) so the styles favor readability.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cf1f55f7-0d2c-417c-a4d8-91484b0160bf

📥 Commits

Reviewing files that changed from the base of the PR and between d33009a and dd56a95.

📒 Files selected for processing (2)
  • .changeset/fix-livechat-transfer-comment-wrap.md
  • apps/meteor/app/theme/client/main.css
📜 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
🧠 Learnings (11)
📓 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:09:09.561Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 38974
File: apps/meteor/app/api/server/v1/im.ts:220-221
Timestamp: 2026-02-24T19:09:09.561Z
Learning: In RocketChat/Rocket.Chat OpenAPI migration PRs for apps/meteor/app/api/server/v1 endpoints, maintainers prefer to avoid any logic changes; style-only cleanups (like removing inline comments) may be deferred to follow-ups to keep scope tight.

Applied to files:

  • .changeset/fix-livechat-transfer-comment-wrap.md
  • apps/meteor/app/theme/client/main.css
📚 Learning: 2025-11-19T12:32:29.696Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.

Applied to files:

  • .changeset/fix-livechat-transfer-comment-wrap.md
📚 Learning: 2026-04-14T21:10:36.233Z
Learnt from: dougfabris
Repo: RocketChat/Rocket.Chat PR: 36292
File: apps/meteor/client/hooks/useHasValidLocationHash.ts:7-12
Timestamp: 2026-04-14T21:10:36.233Z
Learning: In the RocketChat/Rocket.Chat repository, adding JSDoc-style comments to React hooks (e.g., files under apps/meteor/client/hooks/) is considered a good pattern and should not be flagged as a violation of the "avoid code comments in the implementation" guideline. The guideline against code comments does not apply to JSDoc documentation on exported hooks.

Applied to files:

  • .changeset/fix-livechat-transfer-comment-wrap.md
📚 Learning: 2026-02-24T19:05:56.710Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 0
File: :0-0
Timestamp: 2026-02-24T19:05:56.710Z
Learning: Rocket.Chat repo context: When a workspace manifest on develop already pins a dependency version (e.g., packages/web-ui-registration → "rocket.chat/ui-contexts": "27.0.1"), a lockfile change in a feature PR that upgrades only that dependency’s resolution is considered a manifest-driven sync and can be kept, preferably as a small "chore: sync yarn.lock with manifests" commit.

Applied to files:

  • .changeset/fix-livechat-transfer-comment-wrap.md
📚 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:

  • .changeset/fix-livechat-transfer-comment-wrap.md
  • apps/meteor/app/theme/client/main.css
📚 Learning: 2025-11-10T19:06:20.146Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37408
File: apps/meteor/client/views/admin/ABAC/useRoomAttributeOptions.tsx:53-69
Timestamp: 2025-11-10T19:06:20.146Z
Learning: In the Rocket.Chat repository, do not provide suggestions or recommendations about code sections marked with TODO comments. The maintainers have already identified these as future work and external reviewers lack the full context about implementation plans and timing.

Applied to files:

  • .changeset/fix-livechat-transfer-comment-wrap.md
📚 Learning: 2026-02-25T20:10:16.987Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 38913
File: packages/ddp-client/src/legacy/types/SDKLegacy.ts:34-34
Timestamp: 2026-02-25T20:10:16.987Z
Learning: In the RocketChat/Rocket.Chat monorepo, packages/ddp-client and apps/meteor do not use TypeScript project references. Module augmentations in apps/meteor (e.g., declare module 'rocket.chat/rest-typings') are not visible when compiling packages/ddp-client in isolation, which is why legacy SDK methods that depend on OperationResult types for OpenAPI-migrated endpoints must remain commented out.

Applied to files:

  • .changeset/fix-livechat-transfer-comment-wrap.md
📚 Learning: 2026-03-03T11:11:48.541Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 39230
File: apps/meteor/app/api/server/v1/chat.ts:214-222
Timestamp: 2026-03-03T11:11:48.541Z
Learning: In apps/meteor/server/lib/moderation/reportMessage.ts, the reportMessage function validates that description is not empty or whitespace-only with `if (!description.trim())`. When migrating the chat.reportMessage endpoint to OpenAPI, adding minLength validation to the schema preserves this existing behavior.

Applied to files:

  • .changeset/fix-livechat-transfer-comment-wrap.md
📚 Learning: 2026-03-16T21:50:37.589Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39676
File: .changeset/migrate-users-register-openapi.md:3-3
Timestamp: 2026-03-16T21:50:37.589Z
Learning: For changes related to OpenAPI migrations in Rocket.Chat/OpenAPI, when removing endpoint types and validators from rocket.chat/rest-typings (e.g., UserRegisterParamsPOST, /v1/users.register) document this as a minor changeset (not breaking) per RocketChat/Rocket.Chat-Open-API#150 Rule 7. Note that the endpoint type is re-exposed via a module augmentation .d.ts in the consuming package (e.g., packages/web-ui-registration/src/users-register.d.ts). In reviews, ensure the changeset clearly states: this is a non-breaking change, the major version should not be bumped, and the changeset reflects a minor version bump. Do not treat this as a breaking change during OpenAPI migrations.

Applied to files:

  • .changeset/fix-livechat-transfer-comment-wrap.md
📚 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/app/theme/client/main.css
🔇 Additional comments (2)
apps/meteor/app/theme/client/main.css (1)

28-32: LGTM! Flex properties enable proper multi-line wrapping.

The flex-wrap: wrap; combined with align-items: flex-start; correctly allows the flex container to expand vertically and align content appropriately when the message body wraps to multiple lines.

.changeset/fix-livechat-transfer-comment-wrap.md (1)

1-6: LGTM! Changeset correctly declares a patch release.

The patch version bump is appropriate for a bug fix, and the description clearly communicates the change.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@coderabbitai coderabbitai Bot removed the type: bug label May 3, 2026
@TasfinMahmud TasfinMahmud changed the title fix: Fix truncation of Livechat transfer comments fix: fix truncation of Livechat transfer comments May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Omnichannel transfer comment is not wrapped to multiple lines

2 participants