fix(ui): preserve user message newlines#1588
Merged
esengine merged 1 commit intoMay 23, 2026
Merged
Conversation
Owner
|
Merged — thanks. One small follow-up if you do another touch in this area: the regression test could be tightened to pin the rule shape, e.g. |
This was referenced May 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve multiline formatting for user message bubbles in the desktop and dashboard chat UI, so text sent with line breaks continues to display as multiple lines after submission.
Problem
When users send multiline messages, the message content itself is preserved, but the rendered user bubble collapses whitespace because the
.msg-textstyle does not preserve line breaks. As a result, newlines are rendered as spaces and multiline user input appears as a single line.The issue is in the desktop/dashboard message rendering path:
desktop/src/ui/thread.tsxrenders user messages throughUserMsgdashboard/src/ui/thread.tsxrenders user messages throughUserMsgdesktop/src/styles.cssanddashboard/src/styles.cssstyled.msg-textwithoutwhite-space: pre-wrapFix
desktop/src/styles.css— Addedwhite-space: pre-wrapfor.msg.user .msg-textand.msg.user .msg-text.user-pending, preserving user-entered newlines in desktop message bubbles.dashboard/src/styles.css— Added the same user-message-specific whitespace rule for dashboard message bubbles.tests/user-message-newlines.test.ts— Added a regression test that verifies both desktop and dashboard styles include the user bubble whitespace preservation rule.Verification
npm exec vitest run tests/user-message-newlines.test.ts tests/desktop-user-message.test.tsnpm run verifyClosed #1567