Repository navigation
chat: the folded thinking row does not clip to its column — one long reasoning line runs wide - #1721
Merged
Merged
Conversation
The summary is an inline-flex box, so a long reasoning line without breaks sized it to its content: at 900 px it was 1308 px wide inside a 560 px details box, and the opened body ran past the column too. Bound the summary and the preview to their box and let the opened body break anywhere; the summary stays one line (white-space:nowrap keeps the label from wrapping into a stack), the caret and the peek stay as they are. Chromium measurement of the rendered cell at 900 px and 400 px: summary 1308 / 1308 px before, 560 / 312 px after, inside a 560 / 312 px details box; the peek fills what is left (423 / 175 px against a 1236 px line); the opened 2000-character line wraps instead of scrolling to 15397 px. Docs-not-needed: ThinkFlowLab#1718 bounds three CSS rules of the thinking row; no architecture, interface or contract changes. Fixes ThinkFlowLab#1718
HugoXK
force-pushed
the
dev/1-think-row-clip
branch
from
October 29, 2026 16:56
6825235 to
acb38f4
Compare
Collaborator
|
Verdict: PASS at acb38f4 Ran at this tip: Review points:
Not run: the full core suite on this box — a Tier is T1 from the diff (client CSS only), so no PASS was required to merge; this review is written anyway and the guard passes with it. |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 29, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 29, 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.
Fixes #1718
Written-by: Dev-1
Owner: Dev-1
Reviewer: Reviewer
Branch: dev/1-think-row-clip
Base: f0159ea (live main; the issue named aafb8d7, then #1708 moved main to a932752, #1717/#1716 to f8e4943, and #1715 to f0159ea.
styles.jsand this row's DOM are byte-identical on all of them; #1715 re-renderedcore/client.jsand re-encodedpatches/ds-bot/0008, which made this branch conflict, so it is rebased once onto f0159ea and the mirrors are regenerated)Tip: acb38f4
Tree: 95d9c33595167af16306531563f0564c798acb46
Docs-not-needed: #1718 bounds three CSS rules of the thinking row; no architecture, interface or contract changes.
What changed
The folded thinking row is a
<details class="bt-think">whose<summary>is oneinline-flexline. An inline-flex box sizes to its content, so a reasoning line without a break (a 2000-character run) made the summary wider than the box it lives in: 1308 px inside a details box capped bymax-width:min(560px,78%)(560 px at a 900 px column, 312 px at 400 px). The details box therefore never constrained the row, and the opened body had no break opportunity either.Four declarations, all in
core/src/client/styles.js:.bt-think summarygainsmax-width:100%;min-width:0;white-space:nowrap.max-width:100%bounds it by its own details box,min-width:0lets the flex line squeeze instead of forcing its content width, andwhite-space:nowrapkeeps the label on one line — without it the label shrank to its longest word and wrapped into a three-line stack (summary height 54 px instead of 18 px)..bt-think-peekgainsmax-width:100%; it already hadmin-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap, so now the ellipsis fills whatever the summary leaves instead of the content width..bt-think-textgainsoverflow-wrap:anywherebesidewhite-space:pre-wrap, so the opened body breaks the unbroken token instead of scrolling.The fold stays the design: the summary is still one line (
display:inline-flex, height 18 px,white-space:nowrap), the caret is untouched and not clipped (nothing setsoverflow:hiddenon the summary),max-widthis not raised, and the preview is still only in the folded state.#1636(opened row hides the peek),#1642(fence-only gets “{n} line(s) of reasoning”),#1624(no reasoning, no row) keep passing.core/client.jsis regenerated (node core/scripts/build-client.mjs), andpatches/ds-bot/{0003,0008}+files/test/thinking-row.test.jscome fromnode scripts/ds-bot-patches.mjs generate— no hunk is written by hand. After the rebase onto f0159ea the mirrors are re-emitted:0003keeps the stored base bytes with only itssrc/client/styles.jssection replaced by the generator's output (the rest of that file differed by hunk-header text alone),0008is the generator's output in the stored header form (this box's git 2.34.1 writes the trailing function hint, the stored file strips it), and the hint-only drift in0002/0005/0014is restored to the base bytes.patches checkandbuild-client --checkare green.Evidence: geometry, base → fix
The unit suite runs on jsdom, which lays nothing out — every element reports
scrollWidth === clientWidth === 0— and CI runs no browser, so CI carries the containment assertions below. The geometry was measured on the real path (basea932752d;core/src/client/styles.jsandcore/src/client/cells.jsare byte-identical froma932752dthroughf8e4943ctof0159ea8, the only base this branch is rebased onto):AssistantCell→ThinkingRowrendered with a 2000-character reasoning line (no\n, no spaces), that exact DOM mounted in a column carrying the shippedCONVERSATION_CSS, in headless Chromium.Base
a932752d:At this tip:
(The peek's box is 420 / 172 px here rather than 488 / 240: the summary's
white-space:nowrapkeeps the wholeThought it throughlabel on its line, so 120 px of the row is the label instead of the label wrapping into three lines.)Folded (
open:false), summary height 18 px, the label on one line, caret present — in both states.Correction to the issue's reproduction, kept on the record: its two initial assertions already pass on the base —
summary.scrollWidth <= summary.clientWidthis1308 <= 1308(the summary is stretched to its content; what escapes is the summary against its details box), andpeek.scrollWidth > peek.clientWidthis1236 > 1174(the ellipsis already fires). The defect that actually fails on the base issummary.clientWidth > details.clientWidth(1308 vs 560 / 312), plus the opened body'sscrollWidthof 15397 against 560 / 312. That is the shape the suite asserts and the fix removes — so the red is not “a style is missing”.Tests
core/test/thinking-row.test.jsalready mounts this row throughAssistantCell; it gains three cases:max-width:100%,min-width:0,white-space:nowrap; peekmax-width:100%withoverflow:hidden;text-overflow:ellipsis;white-space:nowrap; bodyoverflow-wrap:anywherewithwhite-space:pre-wrap; the details ceiling stillmin(560px,78%); the row folded with its caret andThought it through.display:inline-flexandwhite-space:nowrap, sets nooverflow:hidden(the caret can never be clipped), and the opened row still carries the whole 2000-character line.core/client.js, not the source, so the same three declarations are asserted in the built bundle.Red first at the base
f0159ea8, with only this test file present and the two generated/source files taken from that base (git checkout f0159ea8 -- core/src/client/styles.js core/client.js):At this tip the same file is 12/12, and the pre-existing
#1624/#1636/#1642cases stay green.What was run
Ran at this tip:
TZ=UTC ARCH_DOCS_BASE=f0159ea8 npm run verify→ exit 0 (core 2028/2028, social 539/539, tree 125, timeline 129, workflow 279,.github/scripts549, interop 37, live-e2e 24 — zeronot ok;arch-docs: OK (7 changed file(s));ok 10 patches apply cleanly in order,ok core/ equals ds-bot/ + patches/ds-bot/).node scripts/ds-bot-patches.mjs checkprinted its three green lines, andnode core/scripts/build-client.mjs --checkis silent-green. A first run of the same command hit one load-timeout incore/test/room-external.test.js(#198,timed out waiting for the child); that file passes alone (13/13) and the rerun is the run quoted here.Not run: the smoke test — this is a client CSS change with no
core/index.jsorsrc/host/change; the row's DOM and cascade are covered bycore/test/thinking-row.test.js.Checkpoint
{ "pr": 1721, "claim": "Dev-1", "issue": 1718, "summary": "The folded thinking row no longer runs past its column. The inline-flex summary was sizing itself to a long unbroken reasoning line (1308 px inside a 560 px details box); it is now bounded by its box with max-width:100% and min-width:0, and white-space:nowrap keeps the label on one line. The preview fills what is left and ellipsizes, and the opened body breaks the same token instead of scrolling sideways. Fold, caret, the peek and the #1624/#1636/#1642 behaviour are unchanged.", "files": ["core/src/client/styles.js", "core/client.js", "core/test/thinking-row.test.js", "changelog.d/1718-think-row-clip.fixed.md", "patches/ds-bot/0003-flybot-api-client.patch", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/test/thinking-row.test.js"], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=f0159ea8 npm run verify", "result": "green", "at": "acb38f44cd8265c819e52ae0f61fef6ded8477bf" }, "next": "none — ready for review" }