Skip to content

fix(ui): drop the reasoning body's left rail, restore upstream geometry - #4089

Merged
Astro-Han merged 1 commit into
mainfrom
fix/reasoning-body-rail-rollback
Aug 28, 2026
Merged

fix(ui): drop the reasoning body's left rail, restore upstream geometry#4089
Astro-Han merged 1 commit into
mainfrom
fix/reasoning-body-rail-rollback

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Why

The expanded 深度思考 body gained a 2px link-tinted left rail in #2645. Two problems:

  1. It is not the upstream Astryx design. The ejected ChatReasoning atoms own the body's reading geometry already — secondary text color (xv1l7n4), 8px top padding (x1xye8es), 22px inline-start indent (x1f43n9v, calc(16px + spacing-1-5)) — and none of the ejected atoms draws a border. Upstream differentiates reasoning by color + indent alone.
  2. Half of the added rule was dead code. The atoms' stacked :not(#\#) specificity beats the product class, so padding-top: 2px and padding-inline-start: 12px in padding: 2px 0 4px 12px never applied; the visible line-to-text gap was the atom's 22px, not the authored 12px.

The saturated 32%-link rail also visually outweighed the muted text it framed — the loudest element in the block was the decoration.

What

Restore the pre-#2645 rule on .maka-chat-reasoning-content (white-space: pre-wrap; word-break: break-word; only) and let the upstream atoms own layout. Net diff vs. before #2645 is zero; the comment now records why no rail.

Validation

  • node --test dist/__tests__/chat-turn-answer-identity.test.js — 8/8 pass, including the test that pins white-space: pre-wrap on this rule.
  • No test, story, or e2e fixture references the inset declarations (grep: border-inline-start, margin-inline-start: 22px only matched this rule).

AI-assisted (Maka): investigation, diff, and this description; geometry claims verified against the compiled atoms in @astryxdesign/core dist.

#2645 gave the expanded 深度思考 body a 2px link-tinted inset border plus
its own margin and padding. The saturated rail visually outweighed the
muted secondary text it framed, and a rail is not the upstream Astryx
design: the ejected ChatReasoning atoms already own the body's reading
geometry (secondary color, 8px top padding, 22px inline-start indent) at
ID-level specificity, so the product rule's padding-top and
padding-inline-start never even applied.

Restore the pre-#2645 rule — pre-wrap and word-break only — and let the
upstream atoms own the layout. No test or fixture pinned the inset; the
chat-turn-answer-identity suite (which pins white-space: pre-wrap) passes.

Generated-by: Maka
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Aug 28, 2026

@M4n5ter M4n5ter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 11c0b0b18d478f4fbae2c6c307c9d5dd32ecfb9c: no P0-P3 findings.

This change returns .maka-chat-reasoning-content to the pre-#2645 ownership boundary: Maka keeps only whitespace preservation and long-token wrapping, while the ejected Astryx atoms remain the sole owner of the body's 8px top padding and 22px inline-start padding. The removed product rule's top and inline-start padding were already overridden by those higher-specificity atoms; deleting its effective margin, border, and bottom padding therefore removes the duplicate layout authority without changing the reasoning DOM or interaction contract.

The exact-head hosted checks are green. I also validated the current-main merge result: it changes only this CSS rule, preserves the reviewed blob, builds Core and UI, and passes all 247 UI tests. Biome and git diff --check are clean; there are no existing reviews or review threads.


Posted by an automated review agent operated by @M4n5ter. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.

简体中文

本条评论由 @M4n5ter 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。

@Astro-Han
Astro-Han marked this pull request as ready for review August 28, 2026 14:08
@Astro-Han
Astro-Han merged commit b58428a into main Aug 28, 2026
2 checks passed
@Astro-Han
Astro-Han deleted the fix/reasoning-body-rail-rollback branch August 28, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants