[GH-ISSUE #3720] [GUI] user message bubble collapses line breaks (multi-line input shows on one line) #1552

Closed
opened 2026-11-04 01:52:11 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @xvcezrqpbxtpzblrt on GitHub (Oct 22, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3720

Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Desktop app (Windows)

What happened

A multi-line message typed into the chat box is sent correctly, but the user message bubble renders it as one line: the line breaks are collapsed to spaces. The assistant reply to the same message renders its line breaks normally.

The text is not lost. In the DOM the bubble still contains the \n characters; the bubble is a plain text node with white-space: normal, so the browser collapses them. Assistant bubbles are rendered as Markdown (<p> elements) and are not affected.

Reproduced with the exact text from the report.

Input (three lines):

1、xxxxxxxx
2、xxxxxxxx
3、xxxxxxxx

Rendered user bubble:

1、xxxxxxxx 2、xxxxxxxx 3、xxxxxxxx

Smallest steps or command that reproduce it

  1. Open a chat in the desktop app.
  2. Type 1、xxxxxxxx, press Shift+Enter, type 2、xxxxxxxx, Shift+Enter, type 3、xxxxxxxx. (Pasting the three lines does the same.)
  3. Press Enter to send.
  4. Look at the sent user bubble: it is on one line.

Expected: the user bubble keeps the three lines.
Actual: one line, the newlines become spaces.

Reproduction status

Reproduced locally

Strata version

Strata 0.2.2 · engine 0.1.47

Graphics card, memory and system

RTX 3080 Ti Laptop 16 GB · 64 GB RAM · Windows 11 (10.0.26300)

Model, size and settings

Swift 1.5 IQ3_XXS · 393K context · pictures on

Logs

No engine error: this is client-side rendering. DOM/CSS evidence from the running app (desktop host, http://127.0.0.1:47831):

// user message bubble
element.innerHTML                       // "1、xxxxxxxx\n2、xxxxxxxx\n3、xxxxxxxx\n是否收到"
element.innerText                       // "1、xxxxxxxx 2、xxxxxxxx 3、xxxxxxxx 是否收到"
getComputedStyle(element).whiteSpace    // "normal"
element.getBoundingClientRect().height  // 47 px = 24 px padding + one 22.68 px line

The rule comes from assets/index-BZOwU-vv.css:

.st-bubble { padding: 12px 16px; border-radius: var(--st-r-lg); font-size: var(--st-fs-base); line-height: 1.55; color: var(--st-ink-soft); }

There is no white-space declaration, so the default normal applies.

Possible fix (not tested): .st-msg--user .st-bubble { white-space: pre-wrap; overflow-wrap: anywhere; }, or render the user text through the same line-break-preserving path as the assistant Markdown.

The input box itself is fine: Shift+Enter inserts \n (verified in the textarea) and Enter sends.

Originally created by @xvcezrqpbxtpzblrt on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3720 ### Area [GUI] (the desktop app) ### Desktop app, Terminal or source? Desktop app (Windows) ### What happened A multi-line message typed into the chat box is sent correctly, but the **user** message bubble renders it as one line: the line breaks are collapsed to spaces. The assistant reply to the same message renders its line breaks normally. The text is not lost. In the DOM the bubble still contains the `\n` characters; the bubble is a plain text node with `white-space: normal`, so the browser collapses them. Assistant bubbles are rendered as Markdown (`<p>` elements) and are not affected. Reproduced with the exact text from the report. Input (three lines): ```text 1、xxxxxxxx 2、xxxxxxxx 3、xxxxxxxx ``` Rendered user bubble: ```text 1、xxxxxxxx 2、xxxxxxxx 3、xxxxxxxx ``` ### Smallest steps or command that reproduce it 1. Open a chat in the desktop app. 2. Type `1、xxxxxxxx`, press Shift+Enter, type `2、xxxxxxxx`, Shift+Enter, type `3、xxxxxxxx`. (Pasting the three lines does the same.) 3. Press Enter to send. 4. Look at the sent user bubble: it is on one line. Expected: the user bubble keeps the three lines. Actual: one line, the newlines become spaces. ### Reproduction status Reproduced locally ### Strata version Strata 0.2.2 · engine 0.1.47 ### Graphics card, memory and system RTX 3080 Ti Laptop 16 GB · 64 GB RAM · Windows 11 (10.0.26300) ### Model, size and settings Swift 1.5 IQ3_XXS · 393K context · pictures on ### Logs No engine error: this is client-side rendering. DOM/CSS evidence from the running app (desktop host, `http://127.0.0.1:47831`): ```js // user message bubble element.innerHTML // "1、xxxxxxxx\n2、xxxxxxxx\n3、xxxxxxxx\n是否收到" element.innerText // "1、xxxxxxxx 2、xxxxxxxx 3、xxxxxxxx 是否收到" getComputedStyle(element).whiteSpace // "normal" element.getBoundingClientRect().height // 47 px = 24 px padding + one 22.68 px line ``` The rule comes from `assets/index-BZOwU-vv.css`: ```css .st-bubble { padding: 12px 16px; border-radius: var(--st-r-lg); font-size: var(--st-fs-base); line-height: 1.55; color: var(--st-ink-soft); } ``` There is no `white-space` declaration, so the default `normal` applies. Possible fix (not tested): `.st-msg--user .st-bubble { white-space: pre-wrap; overflow-wrap: anywhere; }`, or render the user text through the same line-break-preserving path as the assistant Markdown. The input box itself is fine: Shift+Enter inserts `\n` (verified in the textarea) and Enter sends.
Author
Owner

@Niko1221 commented on GitHub (Oct 26, 2026):

Fixed in 0.2.5: a multi-line message keeps its line breaks in the bubble.

<!-- gh-comment-id:6423181705 --> @Niko1221 commented on GitHub (Oct 26, 2026): Fixed in 0.2.5: a multi-line message keeps its line breaks in the bubble.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1552
No description provided.