Uh oh!
There was an error while loading. Please reload this page.
fix(ui): restore line wrapping in the deep-thinking disclosure body - #1938
Merged
Conversation
The ejected Astryx ChatReasoning content shell owns no white-space: its StyleX atoms declare only padding/typography/color, so the inherited white-space: normal collapsed every newline in thinking text, swallowing the reasoning line structure (regression from the #1748 migration, which replaced the old whitespace-pre-wrap body with the official component). Give the reasoning body a product class (maka-chat-reasoning-content) on the eject seam and restore the pre-wrap reading contract in @maka/ui styles.css, matching the tool-output body's existing pattern. Regression coverage: - ui render test locks the class on the content div - desktop CSS contract asserts the pre-wrap rule is the only declaration on that class (fails red without the rule)
Codex review (P3): the contract test's 'exactly once' count was a proxy for the real invariant and over-constrained — a future harmless second rule (e.g. a focus outline, a media variant) would false-fail even though white-space stayed pre-wrap. Walk every matching rule body in cascade order and assert the LAST declaration of white-space/word-break is pre-wrap/break-word. Verified: a later white-space: normal re-declaration fails red; a harmless margin addition stays green; the single rule passes.
Astro-Han
marked this pull request as ready for review
August 3, 2026 06:24
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Problem
Desktop 展开"深度思考"后,思考内容的换行全被吞掉(
\n折叠成空格,长推理变成一坨)。Root cause
#1748 把自有 disclosure 迁移到官方 Astryx
ChatReasoning时,思考正文从<pre class="whitespace-pre-wrap">换成了官方内容 div。官方组件的 StyleX 原子不声明 white-space(组件假设 children 是已渲染内容),于是继承默认white-space: normal,换行全部折叠。Live 复现(Storybook + Chrome,修复前):内容 div
ws: "normal",'第一行\n第二行'渲染为lineBoxes: 1(一行)。Fix(eject seam + 产品 CSS)
astryx-chat-reasoning.tsx:内容 div 加产品 classmaka-chat-reasoning-content(不动官方原子)。styles.css:.maka-chat-reasoning-content { white-space: pre-wrap; word-break: break-word; },与 tool 输出面板既有模式一致,位于components层(在astryx-components之后)。Live 验证(修复后):
ws: "pre-wrap",lineBoxes: 3(多行)。Regression coverage
packages/uirender test:锁内容 div 带产品 class。Verification
未覆盖(如实说明)