[GH-ISSUE #5066] [GUI] add a Reply width control: assistant prose is capped at 56ch, about 40% of the 864px column at 1440x920 #2354

Open
opened 2026-11-04 01:58:39 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @xvcezrqpbxtpzblrt on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5066

Area

[GUI] (the desktop app)

What do you want to do?

The user problem. In the desktop app, an assistant answer uses about 40 % of the width the window offers, and the rest of the window stays empty. It is not the model and not the window size: the answer's container is already full width, and one CSS rule caps the prose inside it at 56ch.

On the window this app opens by default — 1440 × 920, apps/desktop/src-tauri/src/main.rs:952 (.inner_size(1440.0, 920.0), .min_inner_size(900.0, 600.0)) — the transcript column is 864 px wide and the prose is ~336–448 px. A 900-character Chinese answer becomes ~30 lines of ~30 glyphs; the right ~40 % of the window is blank, and every answer that happens to contain a table or a code block stretches to the full column, so the shape of a reply is decided by whether the model emitted a table.

I want a Reply width control in Settings → Reading & focus, with three choices:

  • Comfortable — 56ch, what it is today, kept as the choice for narrow windows and Latin prose;
  • Wide — about 72ch (the top of the 45–75 character band the stylesheet itself targets);
  • Full — the prose fills the column like code blocks and tables already do.

Stored in the existing prefs blob (apps/host/src/lib/store.ts:147, strata.prefs.v2, the same place contentFontSize, focus and density live), applied as data-measure on .app, and applied in Focus reading too (today focus mode pins the whole column to calc(56ch + 72px), so the control has to reach that rule as well: app.css:466-470).

I am not asking for the tables and code blocks to shrink: they are right at full width. I am asking for the prose to be allowed to join them, and for the default to be agreed in this issue before anyone writes a patch — CONTRIBUTING asks for exactly that for a change to a default.

Why this is not covered by the existing setting. Reading size changes the cap in proportion (it is 56ch, so the cap is 0.56 × the font's 0 advance × 56, and it scales with the text), which makes the text bigger, not the line reach the column; at 22 px the cap is ~672 px and the column is 864 px, so the gap never closes. Interface size is a root zoom (app.css:4017-4020), so px and ch scale together and the ratio is fixed. Focus reading narrows everything. Density only changes gaps (app.css:514-520). There is no width control to widen.

Who needs it. People who read long technical answers, CJK readers, and anyone on a 1440 px and up display. For CJK the ch unit is not a neutral choice: ch is the advance of the digit 0 (~0.556 em in the resolved face), so 56ch is ~30–32 Chinese glyphs — half of the 45–75 character band the stylesheet's own comment targets, and about half the width of the list items and tables in the same reply.

What do you do today instead?

Nothing is available in the app: maximizing the window does not help (the 920 px column cap binds from ~1194 px of window width, and the 56ch cap binds inside it), the interface-size slider scales the ratio away, and Focus reading makes it narrower.

The workaround I actually use is to ask the model for the answer as a table, because a table is not capped (app.css:4448-4452, .md-table{width:100%}) and prose is. That is a fair description of the current behaviour: the reply is as wide as its widest uncapped element.

Evidence

All file:line references are v0.2.10 (ffa80d7), read from the source; the widths in the second table are measured on this machine as described below.

The chain, from the window to the paragraph (read from the source):

step where width
desktop window apps/desktop/src-tauri/src/main.rs:952 1440 × 920 (min 900 × 600)
main area app.css:45 --st-nav-w: 268px 1172 px
transcript column app.css:2385-2394 .chat__inner{max-width:920px;padding:28px} 920 px border-box
its content box 920 − 28 − 28 864 px
assistant message app.css:2454-2456 .st-msg--assistant{max-width:100%} (beats the kit's .st-msg{max-width:720px}, kit/components.css:63, by import order: main.tsx:3-5) 864 px
the bubble app.css:2457-2458 width:100%; app.css:4418-4422 padding-inline:0; app.css:4708 border:0 864 px
the prose cap app.css:54 --st-measure:56ch; app.css:483-485 .st-msg--assistant .st-bubble :is(p, ul, ol, blockquote){max-width:var(--st-measure)} ~336–448 px
code block Markdown.tsx:89 div.st-code, no cap 864 px
table Markdown.tsx:125 div.md-table-wrap > table.md-table + app.css:4448-4452 width:100% 864 px
formula / picture / heading Markdown.tsx:94 .md-math-block, .md-image, Markdown.tsx:101 h2–h4, no cap 864 px

Nothing in the React layer picks a width from the content: Markdown.tsx emits bare <p>, <ul>, <ol>, <blockquote> for prose (:145, :114, :129, no classes), which is why the cap is a CSS descendant rule and the wide elements are simply the ones it does not name.

Measured on this machine. Method: System.Windows.Forms.TextRenderer.MeasureText (GDI, 96 dpi, TextFormatFlags::NoPadding) on 56 copies of 0, in the face the app resolves to — Segoe UI, because --st-font-ui names GT Walsheim Pro first and that face is licensed and not bundled (kit/tokens.css:12); Chinese glyph width measured the same way as a control (10 × 汉 = 140 px at 14 px, i.e. 1 em).

reading size 56 × 0 (the cap) CJK glyphs per line the column prose share
10 px 280 px 28 864 px 32 %
12 px (the size this install loads) 336 px 28 864 px 39 %
14 px 448 px 32 864 px 52 %
16 px 504 px 31.5 864 px 58 %
22 px (the maximum) 672 px 30.5 864 px 78 %

Two notes so this is not read as more precise than it is: GDI grid-fit quantises advances at small sizes, so a browser's float-advance layout puts 12 px nearer ~373 px than 336 px (0.556 em × 12 × 56); and the 864 px figure is CSS arithmetic, not a render. The app's own harness reproduces the same numbers in a browser: apps/host/scripts/measure.mjs (npm run measure) measures characters-per-line of .st-msg--assistant .st-bubble p at 10/16/22 px, in normal and focus mode, and apps/host/tests/ui-do.test.mjs:228-237 locks the current rule in.

In-app reproduction.

  1. Desktop app on Windows, 1440 × 920, sidebar open.
  2. Ask: 用中文写一段约90字的段落,然后写三条长度相近的中文要点.
  3. The paragraph wraps at ~30 glyphs with a ~400 px right margin; the bullets, the table and the code block in the same answer run to ~864 px.

Design intent, and where it runs out. app.css:477-482 states the intent and names the target: prose shares one measure, "Code blocks, tables and metric grids in the same bubble still use the full width, because a wide table is easier to read than a wrapped one", 45–75 characters per line, with 56ch chosen as ~66–68 real characters. That arithmetic is Latin-centric: for Chinese the same token is ~30 glyphs, and for a 1440 px window it is ~40 % of the column. A control keeps the intent for the people who want it and gives the rest their window back.

Related. #4722 is the same cap: it reported that one reply used three text widths because the list half of the selector pointed at a class the renderer never emits (.md-li, app.css:2470, dead). That landed — app.css:483 now reads :is(p, ul, ol, blockquote) — and its effect is that lists are capped too, so what is left is this: prose and lists narrow, tables and code wide, with no way to choose. This issue is that follow-up; #4722's 460 px at 14 px in the shipped 0.2.8 matches the 448 px above.

Strata version

Desktop app 0.2.10 (source ffa80d7, tag v0.2.10), Windows 11 x64, UI language 中文, reading size 12 px as loaded (the prefs blob on this machine stores contentFontSize: 14 without the sizeDefaults mark, so lib/default-sizes.ts:12-19 resets it to 12 px on load).

Originally created by @xvcezrqpbxtpzblrt on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5066 ### Area [GUI] (the desktop app) ### What do you want to do? **The user problem.** In the desktop app, an assistant answer uses about **40 %** of the width the window offers, and the rest of the window stays empty. It is not the model and not the window size: the answer's container is already full width, and one CSS rule caps the prose inside it at `56ch`. On the window this app opens by default — 1440 × 920, `apps/desktop/src-tauri/src/main.rs:952` (`.inner_size(1440.0, 920.0)`, `.min_inner_size(900.0, 600.0)`) — the transcript column is 864 px wide and the prose is ~336–448 px. A 900-character Chinese answer becomes ~30 lines of ~30 glyphs; the right ~40 % of the window is blank, and every answer that happens to contain a table or a code block stretches to the full column, so the shape of a reply is decided by whether the model emitted a table. I want a **Reply width** control in Settings → Reading & focus, with three choices: - **Comfortable** — `56ch`, what it is today, kept as the choice for narrow windows and Latin prose; - **Wide** — about `72ch` (the top of the 45–75 character band the stylesheet itself targets); - **Full** — the prose fills the column like code blocks and tables already do. Stored in the existing prefs blob (`apps/host/src/lib/store.ts:147`, `strata.prefs.v2`, the same place `contentFontSize`, `focus` and `density` live), applied as `data-measure` on `.app`, and applied in Focus reading too (today focus mode pins the whole column to `calc(56ch + 72px)`, so the control has to reach that rule as well: `app.css:466-470`). I am not asking for the tables and code blocks to shrink: they are right at full width. I am asking for the prose to be allowed to join them, and for the default to be agreed in this issue before anyone writes a patch — CONTRIBUTING asks for exactly that for a change to a default. **Why this is not covered by the existing setting.** Reading size changes the cap in proportion (it is `56ch`, so the cap is 0.56 × the font's `0` advance × 56, and it scales with the text), which makes the text bigger, not the line reach the column; at 22 px the cap is ~672 px and the column is 864 px, so the gap never closes. Interface size is a root `zoom` (`app.css:4017-4020`), so px and `ch` scale together and the ratio is fixed. Focus reading narrows everything. Density only changes gaps (`app.css:514-520`). There is no width control to widen. **Who needs it.** People who read long technical answers, CJK readers, and anyone on a 1440 px and up display. For CJK the `ch` unit is not a neutral choice: `ch` is the advance of the digit `0` (~0.556 em in the resolved face), so `56ch` is ~30–32 Chinese glyphs — half of the 45–75 character band the stylesheet's own comment targets, and about half the width of the list items and tables in the same reply. ### What do you do today instead? Nothing is available in the app: maximizing the window does not help (the 920 px column cap binds from ~1194 px of window width, and the 56ch cap binds inside it), the interface-size slider scales the ratio away, and Focus reading makes it narrower. The workaround I actually use is to ask the model for the answer as a table, because a table is not capped (`app.css:4448-4452`, `.md-table{width:100%}`) and prose is. That is a fair description of the current behaviour: the reply is as wide as its widest uncapped element. ### Evidence All file:line references are `v0.2.10` (`ffa80d7`), read from the source; the widths in the second table are measured on this machine as described below. **The chain, from the window to the paragraph** (read from the source): | step | where | width | | --- | --- | --- | | desktop window | `apps/desktop/src-tauri/src/main.rs:952` | 1440 × 920 (min 900 × 600) | | main area | `app.css:45` `--st-nav-w: 268px` | 1172 px | | transcript column | `app.css:2385-2394` `.chat__inner{max-width:920px;padding:28px}` | 920 px border-box | | its content box | 920 − 28 − 28 | **864 px** | | assistant message | `app.css:2454-2456` `.st-msg--assistant{max-width:100%}` (beats the kit's `.st-msg{max-width:720px}`, `kit/components.css:63`, by import order: `main.tsx:3-5`) | 864 px | | the bubble | `app.css:2457-2458` `width:100%`; `app.css:4418-4422` `padding-inline:0`; `app.css:4708` `border:0` | 864 px | | **the prose cap** | `app.css:54` `--st-measure:56ch`; `app.css:483-485` `.st-msg--assistant .st-bubble :is(p, ul, ol, blockquote){max-width:var(--st-measure)}` | **~336–448 px** | | code block | `Markdown.tsx:89` `div.st-code`, no cap | 864 px | | table | `Markdown.tsx:125` `div.md-table-wrap > table.md-table` + `app.css:4448-4452` `width:100%` | 864 px | | formula / picture / heading | `Markdown.tsx:94` `.md-math-block`, `.md-image`, `Markdown.tsx:101` `h2`–`h4`, no cap | 864 px | Nothing in the React layer picks a width from the content: `Markdown.tsx` emits bare `<p>`, `<ul>`, `<ol>`, `<blockquote>` for prose (`:145`, `:114`, `:129`, no classes), which is why the cap is a CSS descendant rule and the wide elements are simply the ones it does not name. **Measured on this machine.** Method: `System.Windows.Forms.TextRenderer.MeasureText` (GDI, 96 dpi, `TextFormatFlags::NoPadding`) on 56 copies of `0`, in the face the app resolves to — `Segoe UI`, because `--st-font-ui` names `GT Walsheim Pro` first and that face is licensed and not bundled (`kit/tokens.css:12`); Chinese glyph width measured the same way as a control (10 × `汉` = 140 px at 14 px, i.e. 1 em). | reading size | 56 × `0` (the cap) | CJK glyphs per line | the column | prose share | | --- | --- | --- | --- | --- | | 10 px | 280 px | 28 | 864 px | 32 % | | 12 px (the size this install loads) | 336 px | 28 | 864 px | 39 % | | 14 px | 448 px | 32 | 864 px | 52 % | | 16 px | 504 px | 31.5 | 864 px | 58 % | | 22 px (the maximum) | 672 px | 30.5 | 864 px | 78 % | Two notes so this is not read as more precise than it is: GDI grid-fit quantises advances at small sizes, so a browser's float-advance layout puts 12 px nearer ~373 px than 336 px (0.556 em × 12 × 56); and the 864 px figure is CSS arithmetic, not a render. The app's own harness reproduces the same numbers in a browser: `apps/host/scripts/measure.mjs` (`npm run measure`) measures characters-per-line of `.st-msg--assistant .st-bubble p` at 10/16/22 px, in normal and focus mode, and `apps/host/tests/ui-do.test.mjs:228-237` locks the current rule in. **In-app reproduction.** 1. Desktop app on Windows, 1440 × 920, sidebar open. 2. Ask: `用中文写一段约90字的段落,然后写三条长度相近的中文要点`. 3. The paragraph wraps at ~30 glyphs with a ~400 px right margin; the bullets, the table and the code block in the same answer run to ~864 px. **Design intent, and where it runs out.** `app.css:477-482` states the intent and names the target: prose shares one measure, "Code blocks, tables and metric grids in the same bubble still use the full width, because a wide table is easier to read than a wrapped one", 45–75 characters per line, with 56ch chosen as ~66–68 real characters. That arithmetic is Latin-centric: for Chinese the same token is ~30 glyphs, and for a 1440 px window it is ~40 % of the column. A control keeps the intent for the people who want it and gives the rest their window back. **Related.** #4722 is the same cap: it reported that one reply used three text widths because the list half of the selector pointed at a class the renderer never emits (`.md-li`, `app.css:2470`, dead). That landed — `app.css:483` now reads `:is(p, ul, ol, blockquote)` — and its effect is that lists are capped too, so what is left is this: prose and lists narrow, tables and code wide, with no way to choose. This issue is that follow-up; #4722's 460 px at 14 px in the shipped 0.2.8 matches the 448 px above. ### Strata version Desktop app 0.2.10 (source `ffa80d7`, tag `v0.2.10`), Windows 11 x64, UI language 中文, reading size 12 px as loaded (the prefs blob on this machine stores `contentFontSize: 14` without the `sizeDefaults` mark, so `lib/default-sizes.ts:12-19` resets it to 12 px on load).
Author
Owner

@xvcezrqpbxtpzblrt commented on GitHub (Nov 3, 2026):

For a Chinese answer, the full column is not "no measure" — it is the app's own 45–75 character target. Today's 56ch is the one outside it.

I read app.css:49-54 and :477-482 first, and I am not arguing against a measure: 45–75 characters per line is right and the comment is explicit that code blocks and tables keep the full width on purpose. The problem is the unit, not the target. ch is the advance of 0, and 0 is 0.556 em in the resolved face:

Measured on this machine (TextRenderer, NoPadding, 96 dpi, face Microsoft YaHei for CJK, Segoe UI for Latin): 10 × 汉 = 140 px at 14 px → 1 Chinese glyph = 1.000 em; E-n = 0.583 em. So 56ch is ~66–68 Latin characters — inside 45–75, exactly as the comment says — and 28 Chinese characters, because the same token counts a Chinese glyph as half of one.

reading size today: 56ch (measured) Chinese chars/line the column: 864 px Chinese chars/line against the app's own 45–75
10 px 280 px 28 864 px 86 1.6× short (below band); full width = 86, above the band, so the cap is the right rule at 10 px
12 px (shipped default) 336 px 28 864 px 72 1.6× short → below band
14 px (the old default) 448 px 32 864 px 62 1.4× short → below
16 px 504 px 31.5 864 px 54 1.4× short → below
22 px (max) 672 px 30.5 864 px 39 1.5× short → below

Three things follow from that table.

1. The narrow case is a bug in the unit, not a taste fight. The stylesheet's contract is 45–75 characters. A Chinese answer in a 1440 px window gets 28. Asking for 100% here is asking for 72 characters, which is inside the band the project set for itself. Nobody is asking to remove the measure; on Chinese, the full column is the only width that satisfies it.

2. The frequent wrapping is the cost, in numbers. line-height is 1.62 (app.css:492). A 1000-Chinese-glyph answer:

  • today: 28 chars/line → 36 lines, block height 700 px;
  • full column: 72 chars/line → 14 lines, block height 272 px.

The window opens at 920 px (main.rs:952). Today one ordinary answer is taller than the viewport and the eye makes 36 line returns to read it; at full width it is a third of a screen and 14 returns. The report from the person at the keyboard is "换行太快,看着难受" — that is this ratio, not impatience.

3. Small text is the same token, twice. default-sizes.ts:1-2 sets the reading size to 12 px and the interface zoom to 90 % (11-01, from 14 px and 100 %), so prose reaches the screen at 12 × 0.9 = 10.8 CSS px = 8.1 pt, and 10 px reaches 6.8 pt. Latin glyphs survive that; a Chinese glyph with 1.62 leading at 8 pt is at the legibility floor. Note also that the 11-01 change moved both levers the same way: at 14 px the cap was 448 px (32 chars), at 12 px it is 336 px (28 chars) — smaller text made the line shorter too.

And the product already shows that the wide width reads. Every table and code block in the same answer is 864 px (Markdown.tsx:125 → app.css:4448-4452; Markdown.tsx:89), and #4722 is a report of people reading both widths in one bubble. The eye is not saved from scanning by the cap; it is given a new line length per block type.

The proposal, so the Latin case is protected too. A 139-character Latin line is bad (864 px / 0.583 em / 12 px ≈ 139), so the cap must be script-aware, not global — and the app already publishes the script: store.ts:472 sets root.lang to zh-CN/ja/ko, and apps/host/src/styles/*.css contains no :lang() rule today. So:

  • Latin: 56ch, unchanged.
  • :lang(zh|ja|ko): Comfortable = max-width: min(100%, 45em) (45 glyphs = 540 px at 12 px, the bottom of the band), Full = 100%; default Wide, Latin keeps Comfortable as the default.
  • The Reply width control from the issue body, with the CJK default on Wide.
  • Reading size 14 px for zh/ja/ko (12.6 CSS px after the 90 % zoom) and 12 px for Latin, so the 11-01 decision stands where it was measured and does not apply to a script that needs more.

Cost is small and testable: one :lang() block, one key in strata.prefs.v2, and the threshold in tests/ui-do.test.mjs:228-237. scripts/measure.mjs already measures characters-per-line of .st-msg--assistant .st-bubble p at 10/16/22 px, so it can assert 45–75 for each script — that is the check that would have caught the 28-character line. I am not sending a patch: the scope call is yours, and #4722 shows how fast these widths move when the target is written down.

中文摘要(给作者):限宽的 56ch 对拉丁文本 = 66–68 字,正好落在样式表自己写的 45–75 目标里;但 ch 是 0 的宽度(0.556 em),中文一个字是整整 1 em,所以同一份样式在中文上只有 28 字/行,低于自家目标 1.6 倍。1000 字的中文回答在 12px 下要 36 行、700px 高(窗口才 920px),通栏是 14 行、272px;这就是"一直换行"的来源。加上 12px 阅读字号 × 90% 缩放 = 屏上 8.1 磅,中文在 1.62 行距下已到可读性下限。建议按语言分开:拉丁保持 56ch,:lang(zh/ja/ko) 用 45em(舒适)到 100%(通栏=72 字/行,正好在 45–75 内),默认宽版,并把设置项 Reply width 交给人。应用已经在 store.ts:472 写好了 <html lang>,CSS 里现在没有任何 :lang(),改动只有一条规则+一个偏好键+测试阈值。

<!-- gh-comment-id:6597285088 --> @xvcezrqpbxtpzblrt commented on GitHub (Nov 3, 2026): **For a Chinese answer, the full column is not "no measure" — it is the app's own 45–75 character target. Today's `56ch` is the one outside it.** I read `app.css:49-54` and `:477-482` first, and I am not arguing against a measure: 45–75 characters per line is right and the comment is explicit that code blocks and tables keep the full width on purpose. The problem is the **unit**, not the target. `ch` is the advance of `0`, and `0` is 0.556 em in the resolved face: Measured on this machine (`TextRenderer`, `NoPadding`, 96 dpi, face `Microsoft YaHei` for CJK, `Segoe UI` for Latin): `10 × 汉 = 140 px` at 14 px → **1 Chinese glyph = 1.000 em**; `E-n` = 0.583 em. So `56ch` is ~66–68 Latin characters — inside 45–75, exactly as the comment says — and **28 Chinese characters**, because the same token counts a Chinese glyph as half of one. | reading size | today: `56ch` (measured) | Chinese chars/line | the column: 864 px | Chinese chars/line | against the app's own 45–75 | | --- | --- | --- | --- | --- | --- | | 10 px | 280 px | 28 | 864 px | 86 | 1.6× short (below band); full width = 86, above the band, so the cap is the right rule at 10 px | | **12 px (shipped default)** | **336 px** | **28** | 864 px | **72** | **1.6× short → below band** | **inside the band** | | 14 px (the old default) | 448 px | 32 | 864 px | 62 | 1.4× short → below | inside | | 16 px | 504 px | 31.5 | 864 px | 54 | 1.4× short → below | inside | | 22 px (max) | 672 px | 30.5 | 864 px | 39 | 1.5× short → below | below, cap is the right rule here | Three things follow from that table. **1. The narrow case is a bug in the unit, not a taste fight.** The stylesheet's contract is 45–75 characters. A Chinese answer in a 1440 px window gets 28. Asking for `100%` here is asking for 72 characters, which is inside the band the project set for itself. Nobody is asking to remove the measure; on Chinese, the full column is the only width that satisfies it. **2. The frequent wrapping is the cost, in numbers.** `line-height` is 1.62 (`app.css:492`). A 1000-Chinese-glyph answer: - today: 28 chars/line → **36 lines**, block height **700 px**; - full column: 72 chars/line → **14 lines**, block height **272 px**. The window opens at 920 px (`main.rs:952`). Today one ordinary answer is taller than the viewport and the eye makes **36 line returns** to read it; at full width it is a third of a screen and 14 returns. The report from the person at the keyboard is "换行太快,看着难受" — that is this ratio, not impatience. **3. Small text is the same token, twice.** `default-sizes.ts:1-2` sets the reading size to 12 px and the interface zoom to 90 % (11-01, from 14 px and 100 %), so prose reaches the screen at `12 × 0.9 = 10.8 CSS px = 8.1 pt`, and 10 px reaches 6.8 pt. Latin glyphs survive that; a Chinese glyph with 1.62 leading at 8 pt is at the legibility floor. Note also that the 11-01 change moved both levers the same way: at 14 px the cap was 448 px (32 chars), at 12 px it is 336 px (28 chars) — smaller text made the line shorter too. **And the product already shows that the wide width reads.** Every table and code block in the same answer is 864 px (`Markdown.tsx:125` → `app.css:4448-4452`; `Markdown.tsx:89`), and #4722 is a report of people reading both widths in one bubble. The eye is not saved from scanning by the cap; it is given a new line length per block type. **The proposal, so the Latin case is protected too.** A 139-character Latin line is bad (`864 px / 0.583 em / 12 px ≈ 139`), so the cap must be **script-aware, not global** — and the app already publishes the script: `store.ts:472` sets `root.lang` to `zh-CN`/`ja`/`ko`, and `apps/host/src/styles/*.css` contains no `:lang()` rule today. So: - Latin: `56ch`, unchanged. - `:lang(zh|ja|ko)`: Comfortable = `max-width: min(100%, 45em)` (45 glyphs = 540 px at 12 px, the bottom of the band), Full = `100%`; **default Wide**, Latin keeps Comfortable as the default. - The `Reply width` control from the issue body, with the CJK default on Wide. - Reading size 14 px for zh/ja/ko (12.6 CSS px after the 90 % zoom) and 12 px for Latin, so the 11-01 decision stands where it was measured and does not apply to a script that needs more. Cost is small and testable: one `:lang()` block, one key in `strata.prefs.v2`, and the threshold in `tests/ui-do.test.mjs:228-237`. `scripts/measure.mjs` already measures characters-per-line of `.st-msg--assistant .st-bubble p` at 10/16/22 px, so it can assert 45–75 **for each script** — that is the check that would have caught the 28-character line. I am not sending a patch: the scope call is yours, and #4722 shows how fast these widths move when the target is written down. 中文摘要(给作者):限宽的 `56ch` 对拉丁文本 = 66–68 字,正好落在样式表自己写的 45–75 目标里;但 `ch` 是 `0` 的宽度(0.556 em),中文一个字是整整 1 em,所以同一份样式在中文上只有 **28 字/行**,低于自家目标 1.6 倍。1000 字的中文回答在 12px 下要 **36 行、700px 高**(窗口才 920px),通栏是 **14 行、272px**;这就是"一直换行"的来源。加上 12px 阅读字号 × 90% 缩放 = 屏上 8.1 磅,中文在 1.62 行距下已到可读性下限。建议按语言分开:拉丁保持 56ch,`:lang(zh/ja/ko)` 用 `45em`(舒适)到 `100%`(通栏=72 字/行,正好在 45–75 内),默认宽版,并把设置项 `Reply width` 交给人。应用已经在 `store.ts:472` 写好了 `<html lang>`,CSS 里现在没有任何 `:lang()`,改动只有一条规则+一个偏好键+测试阈值。
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#2354
No description provided.