Skip to content

fix(ui): space work-log rows by the column gap alone - #5637

Merged
Astro-Han merged 1 commit into
mainfrom
fix/ui-transcript-row-gap
Sep 23, 2026
Merged

Astro-Han merged 1 commit into
mainfrom
fix/ui-transcript-row-gap

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Rows in an expanded work log were not evenly spaced: 16px above every reasoning and tool row, but 8px above intermediate text. Each text line therefore read as attached to the row above it.

Root cause: Astryx ChatReasoning and ChatToolCalls carry an intrinsic margin-block-start: var(--spacing-2). That default fits Astryx's own ChatMessage composition (4px children gap, ghost bubbles with 12px block padding). Maka's .maka-processing-body is a flex column with its own 8px gap and a flush assistant bubble, so the component margin stacked on the gap.

Fix: the processing body zeroes its children's block-start margin, making gap the only spacing between rows. The existing first-child rule that spaces the body from its summary is unchanged (still 8px). timeline-fold.ts only lets text and processing entries reach .maka-assistant-answer-content, so reasoning and tool rows never sit directly in that column and it needs no rule.

Alternatives not taken: Astryx's xstyle seam needs a StyleX compile step Maka does not have; dropping the atom from the ejected ChatReasoning would fix only reasoning rows and fork the copy from upstream.

Verification

  • NativeConversation story play opens the multi-step turn's work log and asserts every adjacent row gap equals the body's row-gap. Built Storybook with the CSS rule disabled: the play fails (message-bubble → tool-calls: 16, tool-calls → reasoning: 16). With the fix it passes in light and dark through smokeStory from scripts/storybook-visual-smoke.mjs (play, console, AX audit).
  • Measured gaps, main → branch: reasoning→text 8 → 8, text→tool 16 → 8, tool→reasoning 16 → 8.
  • npm --workspace @maka/desktop run typecheck:stories, npm --workspace @maka/ui run build, npm run format, npm run lint: pass.
  • Not run locally: full smoke and E2E (left to CI).

Same story, same 1280px viewport; BEFORE from main's storybook-static, AFTER from this branch's.

Light: work-log row spacing before and after

Dark: work-log row spacing before and after

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code diagnosed the spacing, wrote the CSS fix and story assertion, and produced the comparison images.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Astryx ChatReasoning and ChatToolCalls carry an intrinsic
margin-block-start (--spacing-2) meant for Astryx's own ChatMessage
composition (4px children gap, 12px ghost-bubble padding). Maka's
processing body is a flex column with its own 8px gap and a flush
assistant bubble, so the margin stacked on the gap: 16px above every
reasoning/tool row but 8px above intermediate text, which grouped each
text line with the row above it.

The processing body now zeroes its children's block-start margin so the
gap is the only spacing between rows. The first-child rule that spaces
the body from its summary is unchanged.

The NativeConversation story opens the multi-step work log and asserts
every adjacent row gap equals the body's row-gap; it fails on main's
styles (16px before tool and reasoning rows).

Generated-by: Claude Code
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 23, 2026

@jackwener jackwener 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.

I reviewed 45b4ee6e3b7c918b4f0fb9a0d676eaf14366da71.

No P0–P2.

Astryx ChatReasoning and ChatToolCalls bring margin-block-start, which stacked on .maka-processing-body's 8px gap. Zeroing that margin on the body's children leaves gap as the only space between rows. The first-child rule still spaces the body from the summary.

Hosted test was still running at this review.

简体中文

我审查了 45b4ee6e3b7c918b4f0fb9a0d676eaf14366da71。没有 P0–P2。

过程记录里 Astryx 行自带上边距,叠在 8px gap 上。把子项 margin-block-start 清掉后只剩 gap。本审查时 hosted test 仍在跑。


Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.

@Astro-Han
Astro-Han marked this pull request as ready for review September 23, 2026 15:10
@Astro-Han
Astro-Han merged commit 9082cf1 into main Sep 23, 2026
3 checks passed
@Astro-Han
Astro-Han deleted the fix/ui-transcript-row-gap branch September 23, 2026 15:21
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