') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })(); fix(ui): drop the reasoning body's left rail, restore upstream geometry by Astro-Han · Pull Request #4089 · apache/maka · GitHub
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-actionsgithub-actionsBot added the effort/S Under 100 readable lines label Aug 28, 2026

@M4n5terM4n5ter 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 mainAug 28, 2026
2 checks passed
@Astro-Han
Astro-Han deleted the fix/reasoning-body-rail-rollback branch August 28, 2026 14:08
saltand pushed a commit to saltand/maka-agent that referenced this pull request Aug 31, 2026
…ry (apache#4089)
apache#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-apache#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
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/SUnder 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Astro-Han@M4n5ter