Skip to content

fix(fuselage): username truncate in system msg with long topics#1850

Merged
juliajforesti merged 7 commits intoRocketChat:mainfrom
dodaa08:fix/MessageName-container
Jan 27, 2026
Merged

fix(fuselage): username truncate in system msg with long topics#1850
juliajforesti merged 7 commits intoRocketChat:mainfrom
dodaa08:fix/MessageName-container

Conversation

@dodaa08
Copy link
Contributor

@dodaa08 dodaa08 commented Jan 27, 2026

Proposed changes (including videos or screenshots)

When a system message contains a long room topic, the username gets truncated. This happens because the MessageNameContainer component shrinks to accommodate the long topic text in the flex layout.

Before: Username was truncated when channel topic was long

Image

After: Username displays fully without truncation, topic text wraps naturally
Tested with a demo Storybook component to verify the fix works correctly

Screenshot From 2026-01-27 11-04-24 Screenshot From 2026-01-27 11-04-14

ref : RocketChat/Rocket.Chat#38236

Added flex-shrink: 0 to the MessageNameContainer style (&__name-container in Messages.styles.scss) to prevent it from shrinking when the MessageSystemBody (topic text) is long.

Issue(s)

Fixes RocketChat/Rocket.Chat#38234

COMM-121

Further comments

flex-shrink: 0 prevents the MessageNameContainer from shrinking in the flex layout when the MessageSystemBody (topic text) is long. This ensures the username always displays fully, while the topic text can still wrap naturally.

This fix is applied to the MessageNameContainer component which is used in both regular messages and system messages. The change follows the same pattern used for &__time which also has flex-shrink: 0 to prevent truncation.

Add flex-shrink: 0 to MessageNameContainer to prevent it from shrinking when MessageSystemBody (topic text) is long. This ensures usernames always display fully without truncation.

Fixes #38234
@changeset-bot
Copy link

changeset-bot bot commented Jan 27, 2026

🦋 Changeset detected

Latest commit: 1c688c6

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

This PR includes changesets to release 1 package
Name Type
@rocket.chat/fuselage 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

CLAassistant commented Jan 27, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@juliajforesti juliajforesti left a comment

Choose a reason for hiding this comment

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

hey @dodaa08 !
thanks for your contribution :)
can you please add that story case to the MessageSystem.stories ?

@dodaa08
Copy link
Contributor Author

dodaa08 commented Jan 27, 2026

hey @dodaa08 !
thanks for your contribution :)
can you please add that story case to the MessageSystem.stories ?

Sure, let me do that.

@dodaa08
Copy link
Contributor Author

dodaa08 commented Jan 27, 2026

hey @dodaa08 ! thanks for your contribution :) can you please add that story case to the MessageSystem.stories ?

@juliajforesti I've added the story case, let me know if anything else is needed.

@dodaa08 dodaa08 requested a review from juliajforesti January 27, 2026 15:36
Copy link
Contributor

@juliajforesti juliajforesti left a comment

Choose a reason for hiding this comment

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

What happens if the user has a reeeealy long name though? 🤔

@dodaa08
Copy link
Contributor Author

dodaa08 commented Jan 27, 2026

What happens if the user has a reeeealy long name though? 🤔

Like in the first ss in the PR, the topic will truncate more...

@dodaa08
Copy link
Contributor Author

dodaa08 commented Jan 27, 2026

What happens if the user has a reeeealy long name though? 🤔

for eg :

Screenshot From 2026-01-27 22-58-38 Screenshot From 2026-01-27 11-04-24

@juliajforesti
Copy link
Contributor

Ok, we're moving forward with this approach - it's more important to display the complete name.

Since you added a story, you'll have to update the snapshots yarn jest -u

@dodaa08
Copy link
Contributor Author

dodaa08 commented Jan 27, 2026

Ok, we're moving forward with this approach - it's more important to display the complete name.

Since you added a story, you'll have to update the snapshots yarn jest -u

got it!

@juliajforesti
Copy link
Contributor

CI snapshot test is still failing, did you update it?

@dodaa08
Copy link
Contributor Author

dodaa08 commented Jan 27, 2026

CI snapshot test is still failing, did you update it?

Yeah, let me check it again

@dodaa08
Copy link
Contributor Author

dodaa08 commented Jan 27, 2026

CI snapshot test is still failing, did you update it?

The Name in Snap didn't match the one in the story, I locally generated it after adding a big name so, hoping it to pass now.

@dodaa08 dodaa08 requested a review from juliajforesti January 27, 2026 18:40
@juliajforesti juliajforesti changed the title fix: prevent username truncation in system messages with long topics fix(fuselage): username truncate in system msg with long topics Jan 27, 2026
@juliajforesti juliajforesti merged commit a5028b6 into RocketChat:main Jan 27, 2026
7 checks passed
@dodaa08
Copy link
Contributor Author

dodaa08 commented Jan 27, 2026

Thanks @juliajforesti !

@github-actions github-actions bot mentioned this pull request Jan 27, 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.

Username gets truncated in system messages with long Channel topics

4 participants