mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4722] [GUI] one reply uses three text widths: paragraphs cap at 56ch while lists and tables use the full 864 px, because the list cap targets a class the renderer never emits (.md-li) #2161
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2161
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xvcezrqpbxtpzblrt on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4722
2026-11-06 核对结果:已修且已在装机 0.2.11 CSS 中生效——
.st-msg--assistant .st-bubble :is(p,ul,ol,blockquote){max-width:var(--st-measure)}(dist/assets/index-Dor2RFX-.css)。CJK 每行约 28 字的残余已由 Niko1221 移入 #5066。可关单;如实测段落与列表仍不齐请带场景。Area
[GUI] (the desktop app)
Desktop app, Terminal or source?
Desktop app (Windows)
What happened
Inside one assistant reply, the text is laid out at three different widths, so part of the answer looks as if it were written for a wide screen and part for a narrow one:
With Chinese text the difference is very visible, because the paragraph cap lands at about 30 Chinese characters per line while the list items reach roughly 55. It is not the model: the same answer, the same bubble, three measures.
Cause, in the shipped 0.2.8 stylesheet (
host/dist/assets/index-ycN8HD_X.css):The cap is written for paragraphs and list items, but the renderer never emits the class
md-li: the list branch pushes a bare<ol>/<ul>with plain<li>children (https://github.com/Niko1221/Strata/blob/v0.2.8/apps/host/src/components/Markdown.tsx#L103-L113), and the compiled UI bundleindex-CpwV4C51.jscontains the stringmd-li0 times. So the selector's second half matches nothing:<p>is capped,<li>and<table>are not.Measured, using the app's own stylesheet and its own markup (
.chat__innerfixed at its 920 px maximum, headless Edge 1.4k window, the chat font this install resolves from--st-content-fs):.chat__inner.st-msg/.st-bubble<p>inside the bubble<li>inside the same bubble.md-tableThe second problem is the unit itself:
chis the width of the digit0. At the 14 px chat font,56ch≈ 460 px, which is ~30 Chinese glyphs but ~90 Latin characters. So the intended reading measure is script-dependent: it reads as "comfortable" in English and as "half a column" in Chinese, and any reply that mixes prose with lists shows both at once.Smallest steps or command that reproduce it
In the app:
用中文写一段90字左右的段落,然后写三条同样长度的中文要点,不要空行以外的分段.Off the app, to get the numbers above:
host/dist/assets/index-ycN8HD_X.cssfrom an installed 0.2.8..app > .chatcol > .main__body.chat > .chat__inner > .st-msg.st-msg--assistant > .st-bubble >a<p>, a<ul><li>and a<div class="md-table-wrap"><table class="md-table">, each filled with the same Chinese sentence — and set.main__body.chat{width:1200px}.msedge --headless=new --window-size=1400,900 --dump-dom file:///…/measure.htmland readgetBoundingClientRect().widthfor the three elements: 460 / 824 / 864.Reproduction status
Confirmed by measurement — the widths in the table are read from the shipped stylesheet rendered in a browser, and the person at the keyboard sees the same effect in the app. The dead
.md-liselector is confirmed both in the source atv0.2.8and in the compiled bundle shipped inside the app.Strata version
Strata 0.2.8 — app
0.2.8, Control and engine0.1.54.Graphics card, memory and system
NVIDIA GeForce RTX 3080 Ti Laptop GPU 16 GB - 64 GB RAM - Windows 11 Pro build 26300
Model, size and settings
Qwen3.8-Flash-Next IQ3_S, 384K context. The model only supplies the text; the layout difference is CSS, and it appears for any model.
Logs
None: rendering only, no engine request involved.
Duplicate search
Searched open and closed issues for
width,wrap,measure,narrow,换行,排版:No issue covers the inconsistent measure inside one assistant reply.
Suggested fix (not tested)
.st-bubble li { max-width: var(--st-measure) }), or drop the cap frompand put a single measure on.st-bubble, so prose, bullets and numbering share it.ch-based, e.g.max-width: min(56ch, 34em), so a Chinese paragraph does not come out at roughly half the Latin measure.md-lion list items) if the cap is meant to cover lists — either half of that pair, in the CSS or in the renderer, would make the selector do what it says today.@xvcezrqpbxtpzblrt commented on GitHub (Nov 3, 2026):
Following up from 0.2.10 (
ffa80d7): the fix landed asapp.css:483.st-msg--assistant .st-bubble :is(p, ul, ol, blockquote){max-width:var(--st-measure)}, and.md-liatapp.css:2470is now dead code. So the three widths in one reply became two: prose and lists at56ch, tables and code blocks at the full 864 px.The consequence is script-dependent, because
chis the advance of0(0.556 em in the resolved face) while a Chinese glyph is 1.000 em -- measured here:10 × 汉 = 140 pxat 14 px.56chis ~66–68 Latin characters, which the comment atapp.css:477-482targets at 45–75, and 28 Chinese characters, 1.6x below that band. A 1000-glyph Chinese answer is 36 lines / 700 px tall at 12 px with 1.62 leading (app.css:492); the full column makes it 14 lines / 272 px, in a window that opens at 920 px (main.rs:952).Numbers, the script-aware shape of the rule (
store.ts:472already sets<html lang="zh-CN">) and theReply widthcontrol are in #5066. Nothing needed from this thread -- it is the thread that established the target, so I am recording what the fix changed for CJK readers.