You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(chat): prose tracks the workbench, and settings are clamped before CSS
Review on #72 found `0` documented as "follows the editor's UI font size" while the
code cleared the inline property and let a flat `--prose-size: 14px` win. Making the
description true was the better fix than making it match, because the flat value hid
a real defect: D2 argues prose should read a step ABOVE workbench chrome, and a flat
14px only satisfies that at the default 13px. Raise the editor's UI font for
accessibility and the relationship inverts — 14px prose inside 18px buttons, the
divergence pointing the wrong way, for the users who most need it not to.
`--prose-size` is now `calc(var(--vscode-font-size, 13px) + 1px)`, so the decision
holds at every workbench size. At 13px it still resolves to 14px: nothing moves for
anyone who has not changed it, and T1's ~108-character figure is unaffected.
Both settings are now clamped at the host boundary. `minimum`/`maximum` in the
contribution schema only drive the settings editor — it squiggles and saves anyway,
and a hand-edited settings.json, a synced profile or a bad merge never passes through
that UI. The values land directly in CSS, where `proseWidth: 1` is a one-pixel
transcript: a panel with nothing left on screen to open settings with, whose only way
out is finding the JSON file again. Out-of-range is pulled into range rather than
rejected — someone asking for a 200px measure wants it narrow.
`0` is now stated the same way in all four places it appears: it means "leave the
stylesheet alone", not "unconstrained" (the width's default is a 680px measure) and
not "follow the workbench" (the size's default tracks it, but by the stylesheet's
offset, not by the sentinel).
Guards, each bypass-verified by reverting the fix:
- the size must be workbench-relative, with a px fallback, offset 1-3px, and must
still resolve to 14px at the default — 4 separate failures
- the clamp's ceiling must equal the schema's `maximum`, its floor must exceed the
schema `minimum` (0, the sentinel), and the description must name both
- 0/undefined/NaN/negative/Infinity fall back; below-floor snaps up; absurd snaps down
32 suites green.
Copy file name to clipboardExpand all lines: extensions/levelcode-ai/package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -369,14 +369,14 @@
369
369
"default": 0,
370
370
"minimum": 0,
371
371
"maximum": 24,
372
-
"markdownDescription": "Font size for chat **prose** (message bodies), in pixels. `0` follows the editor's UI font size.\n\nThe workbench size is tuned for menu labels and tree rows; message bodies default to a slightly larger size so a long answer reads comfortably. Controls, cards and the composer always follow the workbench."
372
+
"markdownDescription": "Font size for chat **prose** (message bodies), in pixels. `0` tracks the editor's UI font size, one step larger for reading — a 13px workbench gives 14px prose.\n\nThe workbench size is tuned for menu labels and tree rows; message bodies read a step above it so a long answer is comfortable. Controls, cards and the composer always match the workbench exactly. Values are clamped to 8–24."
373
373
},
374
374
"levelcode.ai.chat.proseWidth": {
375
375
"type": "number",
376
376
"default": 0,
377
377
"minimum": 0,
378
378
"maximum": 2000,
379
-
"markdownDescription": "Maximum width of the chat transcript, in pixels. `0` uses the default reading measure (680px).\n\nOnly has an effect when the panel is wider than the measure — in a narrow sidebar the container already bounds the line length. Set a large value to let the transcript fill the full width."
379
+
"markdownDescription": "Maximum width of the chat transcript, in pixels. `0` uses the default reading measure (680px) — it does **not** mean unconstrained.\n\nOnly has an effect when the panel is wider than the measure: in a narrow sidebar the container already bounds the line length. Raise it to let the transcript spread across a wide editor tab. Values are clamped to 320–2000."
0 commit comments