Skip to content

fix(desktop): widen transcript code blocks - #3617

Merged
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure
Aug 24, 2026
Merged

fix(desktop): widen transcript code blocks#3617
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure

Conversation

@liugddx

@liugddxliugddx commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Keep the shared desktop --maka-chat-measure at 680px, so composer, header notices, hero, interaction, plan, agent-graph, and WorkHub surfaces do not change width.
  • Add a transcript-only 800px measure, matching the Astryx AI Chat conversation message area without adopting the unrelated spacious padding and mask semantics.
  • Preserve the Astryx Markdown 680px prose measure while allowing code cards to fill the 800px transcript container instead of retaining the 400px fit-content floor.
  • Add a focused transcript code-block Storybook scenario for visual review.

Screenshots

Before — 680px transcript/code card:

Code block at the previous 680px transcript measure

After — 800px transcript/code card, with prose still capped at 680px:

Code block at the scoped 800px transcript measure

Scope check

  • --maka-chat-measure: unchanged at 680px.
  • --maka-transcript-measure: 800px, with one runtime consumer: .maka-turn.
  • Measured in the rendered Storybook DOM: turn 800px; Markdown heading/prose measure 680px; code card 800px.
  • Narrow windows still resolve .maka-turn { width: 100% } against available inline space.

Verification

  • npm run lint — 2660 files, passed.
  • npm run format:check — 1605 files, passed.
  • npm --workspace @maka/desktop run typecheck:stories — passed.
  • npm --workspace @maka/desktop run build-storybook — passed.
  • npm --workspace @maka/ui test — 226 passed, 0 failed.
  • Storybook transcript code-block scenario rendered at 680px and 800px; both screenshots were visually checked at the same 1200×600 CSS-pixel viewport.
  • Full workspace build is currently blocked by the latest upstream main baseline: packages/storage/src/__tests__/codex-session-adapter.test.ts:267 references missing decodeStoredMessage. The same failure occurs in upstream main CI run 32664680331; this PR does not alter that file.

AI use

Select exactly one:

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

Tool(s) and scope: Codex inspected the reviewer feedback and Astryx package behavior, narrowed the global change to a transcript-only measure, updated the implementation and visual evidence, synchronized current main, and ran verification.

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

@liugddxliugddx changed the title fix(desktop): widen the chat reading measurefix(desktop): widen transcript code blocksAug 23, 2026
Astro-Han
Astro-Han previously approved these changes Aug 23, 2026

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed exact head 9fe8ec4. Coverage: the shared 680→880px desktop chat measure across transcript, composer, header, hero, interaction/plan/agent-graph consumers and their responsive caps; Markdown CodeBlock width behavior for single-line and multiline fences; Storybook scenario and supplied before/after evidence. Exclusions: live Electron interaction at multiple OS scaling factors and exhaustive visual review of every shared-measure consumer. Local UI→Desktop builds passed and the full UI suite is 217/217 green; hosted exact-head test is green. No P0–P3 findings. The branch is 24 commits behind current main; a current-main merge-tree probe is clean.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up on the already-published approval, raised by a maintainer after it went out. Not a defect claim and not a retraction of the approval — a request for evidence proportional to the change surface.

The diff is small, but this line is not transcript-scoped. --maka-chat-measure lives on :root and is consumed by the transcript, composer, header, onboarding hero, and the interaction / plan / agent-graph surfaces. Moving it 680px -> 880px is a global layout change delivered through a five-file diff, so fix(desktop): widen transcript code blocks understates what lands.

The existing review verified that every consumer caps itself at the available inline size and that no surface overflows, and it explicitly excluded exhaustive visual regression across those consumers and real multi-scale-factor Electron interaction. That exclusion is exactly where a 200px widening carries its risk: the logical claim has evidence, the appearance claim does not.

Two things would close it:

  1. Before/after screenshots for the other --maka-chat-measure consumers, not only the transcript code block — composer, header, hero, and the interaction / plan / agent-graph surfaces. The two screenshots in this PR cover the motivating case only.
  2. Either retitle to reflect a global measure change, or split the :root token change into its own PR so the transcript fix can land on its own evidence.

Separately, we are checking what width the upstream Astryx template recommends for an AI chat surface. If the official guidance names a value, this token should agree with it rather than being chosen independently; we will post that finding here when we have it.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up with the upstream comparison promised in the previous comment. The 880px value has no Astryx basis, and the closest official AI-chat figure is 800px. I verified this against the vendored package rather than taking it second-hand.

  • @astryxdesign/cli/assets/templates/pages/ai-chat/page.tsx — the official "AI Chat Conversation" page renders <ChatLayout density="spacious">.
  • @astryxdesign/core/src/Chat/ChatLayout.tsx — for that density, both messageAreaSpacious and dockInnerSpacious are capped at maxWidth: 800. That single value bounds the transcript and the composer, which makes it the closest upstream analogue to this repo's shared --maka-chat-measure.

Two nearby values are not an AI-chat recommendation and should not be cited as one:

  • Markdown.tsx defaults contentWidth to 680px, but its own documentation scopes that to paragraphs, headings, lists and blockquotes; tables and code blocks are explicitly allowed to fill the container. So 680 is a prose measure, not a transcript/composer width — and notably, upstream's answer to "code fences look cramped" is that code is already exempt from the prose measure, not that the prose measure should grow.
  • pages/ai-chat-landing/page.tsx uses contentWidth={720}, but that is the landing/greeting surface, not a conversation transcript.

The theme-neutral package ships no chat or prose width token, and neither this repo's Astryx alignment audits nor the vendored patch mention 880 or anything equivalent.

So the accurate statement is: upstream picked 800 for a conversation surface, 680 for prose, and 880 is this project's own product judgement. That is a legitimate thing to decide — but it has to be carried by product evidence, not by an implied upstream endorsement, and the evidence should cover every --maka-chat-measure consumer rather than the code-block case alone.

On process: the earlier approval on this PR was published before this comparison existed, and the reviewer who issued it has since said it was too strong to stand as merge evidence. This repository does not dismiss reviews, so that approval cannot be withdrawn mechanically — please treat this comment as superseding it. Nothing here is a defect claim about the code; it is a request that the change surface and the evidence match before this lands.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

补一条来自 Astryx 官方值的建议(承接前面关于「官方模板宽度是多少」的问题)。

查了 vendored 的 @astryxdesign/core/src/Chat/ChatLayout.tsx:官方 AI Chat Conversation 这一档的宽度是 800pxmessageAreaSpacious { maxWidth: 800 } / dockInnerSpacious { maxWidth: 800 }),而当前仓库用的 balanced 档两者都是 maxWidth: '100%'(不设上限)。所以 880 不是官方值,800 才是。

另外有人提过「直接切 <ChatLayout density=\"spacious\">」这条路,我核过之后认为它单独不成立,两个原因:

  1. spacious 不是一个纯宽度旋钮:它同时把消息区 paddingInline 0 → --spacing-4、dock 边距 --spacing-3--spacing-4、顶部渐隐 100px → 120px、mask ramp 36px → 48px。是一整档间距语义。
  2. 覆盖面不够:ChatLayout 只拥有转录区和输入坞内层两处。--maka-chat-measure 的其余消费点(composer.csshero.cssinteraction-prompts.cssplan-mode.csschat-header.cssagent-graph.csspackages/ui/src/styles.css)都是纯 CSS,不经过 ChatLayout,切 density 之后它们仍停在旧值,界面上会出现两套并存的量度。

这不改变之前那条请求(需要补齐所有消费面的前后对比);只是把「取哪个数」这一项收敛掉了。

Comment threadapps/desktop/src/renderer/maka-tokens.css Outdated
@Astro-Han
Astro-Han dismissed their stale reviewAugust 23, 2026 18:24

Withdrawing this approval. It was submitted before the review of this PR was complete, and the same reviewer retracted it in a follow-up comment shortly afterwards. Two blocking concerns remain open on this exact head: the before/after evidence across every --maka-chat-measure consumer has not been supplied, and the chosen 880px has no upstream basis (Astryx's official AI Chat Conversation width is 800px). Leaving a green approval attached to this head would misrepresent the review state.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Addressed the follow-up at exact head 0000bc544fa9949740a73ae4cf3f464d6e8c2acd.

Scope decision

I took the scope-reduction option rather than widening the shared token:

  • --maka-chat-measure is restored to and remains at 680px.
  • A new --maka-transcript-measure: 800px has exactly one runtime consumer: .maka-turn.
  • Composer, header notices, hero, interaction, plan, agent-graph, and the new WorkHub consumer therefore keep their existing 680px behavior; no before/after evidence is needed for surfaces this PR no longer changes.
  • The 800px value follows the Astryx AI Chat conversation message-area value. This does not switch to density="spacious", so Maka keeps its existing balanced padding, dock margin, and mask semantics.

This also makes the existing title accurate again: the delivered layout change is transcript-scoped.

Rendered evidence

At the same 1200×600 CSS-pixel Storybook viewport:

  • before: transcript turn / code card = 680px;
  • after: transcript turn = 800px, Markdown prose heading remains 680px, code card = 800px;
  • the code card now fills the transcript via CodeBlock width="100%" instead of Astryx fit-content with its 400px floor.

The PR description now contains regenerated, same-viewport before/after screenshots for the scoped change.

Verification

  • npm run lint — 2660 files passed
  • npm run format:check — 1605 files passed
  • npm --workspace @maka/desktop run typecheck:stories — passed
  • npm --workspace @maka/desktop run build-storybook — passed
  • npm --workspace @maka/ui test — 226 passed, 0 failed
  • git diff --check — passed

Baseline note: the full workspace build currently fails on latest upstream main at packages/storage/src/__tests__/codex-session-adapter.test.ts:267 because decodeStoredMessage is undefined. Upstream main CI run 32664680331 has the same failure; this PR does not touch that path.

Please re-review this exact head.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving at a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

The [P2] I raised earlier — the transcript measure token — is fixed at this head: --maka-chat-measure is 680px, --maka-transcript-measure is 800px scoped to .maka-turn, and 880 no longer appears anywhere in maka-tokens.css. That thread is resolved.

Gate at this exact head: hosted test is terminal green (all 38 steps, including Desktop e2e, Browser WebContentsView smoke, Alignment audit, Storybook build and smoke, and the CLI candidate build and validation). Zero unresolved review threads. No APPROVED review is bound to an older commit — the one prior approval was dismissed and has not been re-issued.

Approval only; merging is a human's call.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Synced main at 3bb645e99 into this branch in merge commit a8f65f508.

The merge brings in the upstream #3656 storage test fix (decodeStoredMessage -> the canonical decoder); it does not change this PR's five-file UI/Storybook diff. The previous CI failure was exactly that upstream storage compile error.

Fresh verification is green:

  • CI test 32682456425 passed in 16m15s.
  • The run passed build, release contracts, typecheck, affected workspace tests, Runtime Host tests, Desktop E2E, Storybook build/smoke, and installed CLI validation.

The PR is ready for review at exact head a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

@Astro-Han

Copy link
Copy Markdown
Contributor

One comment-wording request and then this is good to go — the code itself is fine.

The new token comment reads as though 800px were an Astryx-mandated value:

Astryx's AI Chat conversation uses an 800px message area…

That is true only at Astryx's spacious density. Maka's chat surface runs at balanced (packages/ui/src/chat-surface-layout.tsx:37, deliberately letting Astryx's own @default 'balanced' stand), and at balanced — as at compact — the message area resolves to max-width: 100%. Astryx hands width to the host at that density rather than prescribing one.

So 800px is Maka's own choice here, not conformance to an upstream rule. That is a perfectly good choice — it matches the reading width Astryx picks for spacious — but the comment should say so, otherwise a future reader will treat the number as untouchable upstream policy.

Suggested rewording, roughly: at balanced density Astryx leaves the message area at max-width: 100% and delegates width to the host; Maka sets its transcript measure to 800px, matching the value Astryx uses at spacious, while prose stays at 680px and code/tables fill the wider container.

Keep the value; just retire the attribution.

中文

只有一处注释措辞需要改,代码本身没问题。

新加的 token 注释写成了"Astryx 的 AI Chat 会话使用 800px 消息区",这句话只在 Astryx 的 spacious 密度下成立。Maka 的聊天面跑在 balanced(见 packages/ui/src/chat-surface-layout.tsx:37,当初就是特意让 Astryx 自己的 @default 'balanced' 生效),而 balanced 与 compact 一样,消息区解析为 max-width: 100%——在这个密度下 Astryx 把宽度交给宿主,并没有规定值。

所以 800px 是 Maka 自己的选择,而不是对上游规范的遵循。这个选择没问题(它正好等于 Astryx 在 spacious 下采用的阅读宽度),但注释应当如实说明,否则后来的人会把这个数字当成不可改动的上游政策。

建议改成大意如下:balanced 密度下 Astryx 将消息区保持在 max-width: 100% 并把宽度交给宿主;Maka 自行将 transcript 宽度定为 800px,与 Astryx 在 spacious 下的取值一致,同时 prose 仍为 680px,代码与表格填满容器。

值保留,去掉冒称上游规定的说法即可。

@Astro-Han

Copy link
Copy Markdown
Contributor

LGTM — merging. Thanks for narrowing this to a transcript-scoped token instead of widening the shared measure, and for writing the 800px provenance into the file.

中文

看过了,合并。感谢改成 transcript 范围的单独 token 而不是加宽共享量度,也感谢把 800px 的来源写进了文件里。

@Astro-Han
Astro-Han merged commit aed0a65 into apache:mainAug 24, 2026
1 check passed
Astro-Han added a commit that referenced this pull request Aug 27, 2026
Adversarial review of the previous two commits, on the simplicity axis only.
The unit contract goes. It asserted Astryx's private `--x-maxWidth` StyleX
output, so an upstream change of internal representation would fail it with no
product signal, and both regressions it covered — the prop dropped, the upstream
default changed — already fail the E2E, measured at 120px. One behaviour, one
test.
Comments lose what the code already says: the token block, the prop comment, and
the spec docblock each keep only the external fact a reader cannot derive, which
is that Astryx caps prose at 680px. The docblock also claimed a turn has one
right edge; `.maka-turn-lineage-row` and `.maka-turn-footer` cap at
`--maka-chat-measure` by design, so that claim would have sent the next reader
to "fix" them.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers. Both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
Wider, not narrower, because narrowing would undo #3617 and put code back in a
column too tight to read. The composer, hero and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero
and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
Which authority holds the measure is the caller's to say, so `contentWidth` is a
`Markdown` / `MarkdownBody` prop. The transcript turn passes `100%` and lets its
column govern. The two other callers — the Daily Review report and the Artifact
Preview — sit in containers that hold no measure of their own, so for them
Astryx's 680px cap IS the measure and they leave the prop alone.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container actually has a measure, and two did not.
Astryx renders a supplied `components.code` bare — no spacing, no width, no
alignment — and Maka always supplies one, so the Daily Review report and the
Artifact Preview were already showing prose at 680 with code blocks running the
full width of an uncapped page: the same two edges, one surface over. Both
containers now hold the measure, which is what the transcript column was doing
all along.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container has one, and the two document callers
did not. Astryx renders a supplied `components.code` bare — no spacing, no
width, no alignment — and Maka always supplies one, so on the Daily Review
report, which sits on an uncapped module page, prose stopped at 680 while the
code blocks inside it ran the width of the window. The report column holds the
measure now, and it is the column and not the prose inside it: a section is a
heading, a divider and its prose, so capping only the prose would have left the
other two running past it. The Artifact Preview pane caps itself at 600px and so
never showed this in the normal layout; it holds the measure for the stacked
layout a narrow window switches to, where the workbar drops that cap.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
The Artifact Preview comment loses a number for the same reason. It had written
the workbar's 600px cap out as a literal, which is a second copy of a value
`SESSION_WORKBAR_MAX_WIDTH` already owns and nothing keeps in sync; it names the
constant instead.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. #3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo #3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs #3617
Generated-by: Claude Code
saltand pushed a commit to saltand/maka-agent that referenced this pull request Aug 31, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. apache#3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo apache#3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs apache#3617
Generated-by: Claude Code
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@liugddx@Astro-Han
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
fix(desktop): widen transcript code blocks by liugddx · Pull Request #3617 · apache/maka · GitHub
Skip to content

fix(desktop): widen transcript code blocks - #3617

Merged
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure
Aug 24, 2026
Merged

fix(desktop): widen transcript code blocks#3617
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure

Conversation

@liugddx

@liugddxliugddx commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Keep the shared desktop --maka-chat-measure at 680px, so composer, header notices, hero, interaction, plan, agent-graph, and WorkHub surfaces do not change width.
  • Add a transcript-only 800px measure, matching the Astryx AI Chat conversation message area without adopting the unrelated spacious padding and mask semantics.
  • Preserve the Astryx Markdown 680px prose measure while allowing code cards to fill the 800px transcript container instead of retaining the 400px fit-content floor.
  • Add a focused transcript code-block Storybook scenario for visual review.

Screenshots

Before — 680px transcript/code card:

Code block at the previous 680px transcript measure

After — 800px transcript/code card, with prose still capped at 680px:

Code block at the scoped 800px transcript measure

Scope check

  • --maka-chat-measure: unchanged at 680px.
  • --maka-transcript-measure: 800px, with one runtime consumer: .maka-turn.
  • Measured in the rendered Storybook DOM: turn 800px; Markdown heading/prose measure 680px; code card 800px.
  • Narrow windows still resolve .maka-turn { width: 100% } against available inline space.

Verification

  • npm run lint — 2660 files, passed.
  • npm run format:check — 1605 files, passed.
  • npm --workspace @maka/desktop run typecheck:stories — passed.
  • npm --workspace @maka/desktop run build-storybook — passed.
  • npm --workspace @maka/ui test — 226 passed, 0 failed.
  • Storybook transcript code-block scenario rendered at 680px and 800px; both screenshots were visually checked at the same 1200×600 CSS-pixel viewport.
  • Full workspace build is currently blocked by the latest upstream main baseline: packages/storage/src/__tests__/codex-session-adapter.test.ts:267 references missing decodeStoredMessage. The same failure occurs in upstream main CI run 32664680331; this PR does not alter that file.

AI use

Select exactly one:

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

Tool(s) and scope: Codex inspected the reviewer feedback and Astryx package behavior, narrowed the global change to a transcript-only measure, updated the implementation and visual evidence, synchronized current main, and ran verification.

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

@liugddxliugddx changed the title fix(desktop): widen the chat reading measurefix(desktop): widen transcript code blocksAug 23, 2026
Astro-Han
Astro-Han previously approved these changes Aug 23, 2026

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed exact head 9fe8ec4. Coverage: the shared 680→880px desktop chat measure across transcript, composer, header, hero, interaction/plan/agent-graph consumers and their responsive caps; Markdown CodeBlock width behavior for single-line and multiline fences; Storybook scenario and supplied before/after evidence. Exclusions: live Electron interaction at multiple OS scaling factors and exhaustive visual review of every shared-measure consumer. Local UI→Desktop builds passed and the full UI suite is 217/217 green; hosted exact-head test is green. No P0–P3 findings. The branch is 24 commits behind current main; a current-main merge-tree probe is clean.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up on the already-published approval, raised by a maintainer after it went out. Not a defect claim and not a retraction of the approval — a request for evidence proportional to the change surface.

The diff is small, but this line is not transcript-scoped. --maka-chat-measure lives on :root and is consumed by the transcript, composer, header, onboarding hero, and the interaction / plan / agent-graph surfaces. Moving it 680px -> 880px is a global layout change delivered through a five-file diff, so fix(desktop): widen transcript code blocks understates what lands.

The existing review verified that every consumer caps itself at the available inline size and that no surface overflows, and it explicitly excluded exhaustive visual regression across those consumers and real multi-scale-factor Electron interaction. That exclusion is exactly where a 200px widening carries its risk: the logical claim has evidence, the appearance claim does not.

Two things would close it:

  1. Before/after screenshots for the other --maka-chat-measure consumers, not only the transcript code block — composer, header, hero, and the interaction / plan / agent-graph surfaces. The two screenshots in this PR cover the motivating case only.
  2. Either retitle to reflect a global measure change, or split the :root token change into its own PR so the transcript fix can land on its own evidence.

Separately, we are checking what width the upstream Astryx template recommends for an AI chat surface. If the official guidance names a value, this token should agree with it rather than being chosen independently; we will post that finding here when we have it.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up with the upstream comparison promised in the previous comment. The 880px value has no Astryx basis, and the closest official AI-chat figure is 800px. I verified this against the vendored package rather than taking it second-hand.

  • @astryxdesign/cli/assets/templates/pages/ai-chat/page.tsx — the official "AI Chat Conversation" page renders <ChatLayout density="spacious">.
  • @astryxdesign/core/src/Chat/ChatLayout.tsx — for that density, both messageAreaSpacious and dockInnerSpacious are capped at maxWidth: 800. That single value bounds the transcript and the composer, which makes it the closest upstream analogue to this repo's shared --maka-chat-measure.

Two nearby values are not an AI-chat recommendation and should not be cited as one:

  • Markdown.tsx defaults contentWidth to 680px, but its own documentation scopes that to paragraphs, headings, lists and blockquotes; tables and code blocks are explicitly allowed to fill the container. So 680 is a prose measure, not a transcript/composer width — and notably, upstream's answer to "code fences look cramped" is that code is already exempt from the prose measure, not that the prose measure should grow.
  • pages/ai-chat-landing/page.tsx uses contentWidth={720}, but that is the landing/greeting surface, not a conversation transcript.

The theme-neutral package ships no chat or prose width token, and neither this repo's Astryx alignment audits nor the vendored patch mention 880 or anything equivalent.

So the accurate statement is: upstream picked 800 for a conversation surface, 680 for prose, and 880 is this project's own product judgement. That is a legitimate thing to decide — but it has to be carried by product evidence, not by an implied upstream endorsement, and the evidence should cover every --maka-chat-measure consumer rather than the code-block case alone.

On process: the earlier approval on this PR was published before this comparison existed, and the reviewer who issued it has since said it was too strong to stand as merge evidence. This repository does not dismiss reviews, so that approval cannot be withdrawn mechanically — please treat this comment as superseding it. Nothing here is a defect claim about the code; it is a request that the change surface and the evidence match before this lands.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

补一条来自 Astryx 官方值的建议(承接前面关于「官方模板宽度是多少」的问题)。

查了 vendored 的 @astryxdesign/core/src/Chat/ChatLayout.tsx:官方 AI Chat Conversation 这一档的宽度是 800pxmessageAreaSpacious { maxWidth: 800 } / dockInnerSpacious { maxWidth: 800 }),而当前仓库用的 balanced 档两者都是 maxWidth: '100%'(不设上限)。所以 880 不是官方值,800 才是。

另外有人提过「直接切 <ChatLayout density=\"spacious\">」这条路,我核过之后认为它单独不成立,两个原因:

  1. spacious 不是一个纯宽度旋钮:它同时把消息区 paddingInline 0 → --spacing-4、dock 边距 --spacing-3--spacing-4、顶部渐隐 100px → 120px、mask ramp 36px → 48px。是一整档间距语义。
  2. 覆盖面不够:ChatLayout 只拥有转录区和输入坞内层两处。--maka-chat-measure 的其余消费点(composer.csshero.cssinteraction-prompts.cssplan-mode.csschat-header.cssagent-graph.csspackages/ui/src/styles.css)都是纯 CSS,不经过 ChatLayout,切 density 之后它们仍停在旧值,界面上会出现两套并存的量度。

这不改变之前那条请求(需要补齐所有消费面的前后对比);只是把「取哪个数」这一项收敛掉了。

Comment threadapps/desktop/src/renderer/maka-tokens.css Outdated
@Astro-Han
Astro-Han dismissed their stale reviewAugust 23, 2026 18:24

Withdrawing this approval. It was submitted before the review of this PR was complete, and the same reviewer retracted it in a follow-up comment shortly afterwards. Two blocking concerns remain open on this exact head: the before/after evidence across every --maka-chat-measure consumer has not been supplied, and the chosen 880px has no upstream basis (Astryx's official AI Chat Conversation width is 800px). Leaving a green approval attached to this head would misrepresent the review state.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Addressed the follow-up at exact head 0000bc544fa9949740a73ae4cf3f464d6e8c2acd.

Scope decision

I took the scope-reduction option rather than widening the shared token:

  • --maka-chat-measure is restored to and remains at 680px.
  • A new --maka-transcript-measure: 800px has exactly one runtime consumer: .maka-turn.
  • Composer, header notices, hero, interaction, plan, agent-graph, and the new WorkHub consumer therefore keep their existing 680px behavior; no before/after evidence is needed for surfaces this PR no longer changes.
  • The 800px value follows the Astryx AI Chat conversation message-area value. This does not switch to density="spacious", so Maka keeps its existing balanced padding, dock margin, and mask semantics.

This also makes the existing title accurate again: the delivered layout change is transcript-scoped.

Rendered evidence

At the same 1200×600 CSS-pixel Storybook viewport:

  • before: transcript turn / code card = 680px;
  • after: transcript turn = 800px, Markdown prose heading remains 680px, code card = 800px;
  • the code card now fills the transcript via CodeBlock width="100%" instead of Astryx fit-content with its 400px floor.

The PR description now contains regenerated, same-viewport before/after screenshots for the scoped change.

Verification

  • npm run lint — 2660 files passed
  • npm run format:check — 1605 files passed
  • npm --workspace @maka/desktop run typecheck:stories — passed
  • npm --workspace @maka/desktop run build-storybook — passed
  • npm --workspace @maka/ui test — 226 passed, 0 failed
  • git diff --check — passed

Baseline note: the full workspace build currently fails on latest upstream main at packages/storage/src/__tests__/codex-session-adapter.test.ts:267 because decodeStoredMessage is undefined. Upstream main CI run 32664680331 has the same failure; this PR does not touch that path.

Please re-review this exact head.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving at a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

The [P2] I raised earlier — the transcript measure token — is fixed at this head: --maka-chat-measure is 680px, --maka-transcript-measure is 800px scoped to .maka-turn, and 880 no longer appears anywhere in maka-tokens.css. That thread is resolved.

Gate at this exact head: hosted test is terminal green (all 38 steps, including Desktop e2e, Browser WebContentsView smoke, Alignment audit, Storybook build and smoke, and the CLI candidate build and validation). Zero unresolved review threads. No APPROVED review is bound to an older commit — the one prior approval was dismissed and has not been re-issued.

Approval only; merging is a human's call.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Synced main at 3bb645e99 into this branch in merge commit a8f65f508.

The merge brings in the upstream #3656 storage test fix (decodeStoredMessage -> the canonical decoder); it does not change this PR's five-file UI/Storybook diff. The previous CI failure was exactly that upstream storage compile error.

Fresh verification is green:

  • CI test 32682456425 passed in 16m15s.
  • The run passed build, release contracts, typecheck, affected workspace tests, Runtime Host tests, Desktop E2E, Storybook build/smoke, and installed CLI validation.

The PR is ready for review at exact head a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

@Astro-Han

Copy link
Copy Markdown
Contributor

One comment-wording request and then this is good to go — the code itself is fine.

The new token comment reads as though 800px were an Astryx-mandated value:

Astryx's AI Chat conversation uses an 800px message area…

That is true only at Astryx's spacious density. Maka's chat surface runs at balanced (packages/ui/src/chat-surface-layout.tsx:37, deliberately letting Astryx's own @default 'balanced' stand), and at balanced — as at compact — the message area resolves to max-width: 100%. Astryx hands width to the host at that density rather than prescribing one.

So 800px is Maka's own choice here, not conformance to an upstream rule. That is a perfectly good choice — it matches the reading width Astryx picks for spacious — but the comment should say so, otherwise a future reader will treat the number as untouchable upstream policy.

Suggested rewording, roughly: at balanced density Astryx leaves the message area at max-width: 100% and delegates width to the host; Maka sets its transcript measure to 800px, matching the value Astryx uses at spacious, while prose stays at 680px and code/tables fill the wider container.

Keep the value; just retire the attribution.

中文

只有一处注释措辞需要改,代码本身没问题。

新加的 token 注释写成了"Astryx 的 AI Chat 会话使用 800px 消息区",这句话只在 Astryx 的 spacious 密度下成立。Maka 的聊天面跑在 balanced(见 packages/ui/src/chat-surface-layout.tsx:37,当初就是特意让 Astryx 自己的 @default 'balanced' 生效),而 balanced 与 compact 一样,消息区解析为 max-width: 100%——在这个密度下 Astryx 把宽度交给宿主,并没有规定值。

所以 800px 是 Maka 自己的选择,而不是对上游规范的遵循。这个选择没问题(它正好等于 Astryx 在 spacious 下采用的阅读宽度),但注释应当如实说明,否则后来的人会把这个数字当成不可改动的上游政策。

建议改成大意如下:balanced 密度下 Astryx 将消息区保持在 max-width: 100% 并把宽度交给宿主;Maka 自行将 transcript 宽度定为 800px,与 Astryx 在 spacious 下的取值一致,同时 prose 仍为 680px,代码与表格填满容器。

值保留,去掉冒称上游规定的说法即可。

@Astro-Han

Copy link
Copy Markdown
Contributor

LGTM — merging. Thanks for narrowing this to a transcript-scoped token instead of widening the shared measure, and for writing the 800px provenance into the file.

中文

看过了,合并。感谢改成 transcript 范围的单独 token 而不是加宽共享量度,也感谢把 800px 的来源写进了文件里。

@Astro-Han
Astro-Han merged commit aed0a65 into apache:mainAug 24, 2026
1 check passed
Astro-Han added a commit that referenced this pull request Aug 27, 2026
Adversarial review of the previous two commits, on the simplicity axis only.
The unit contract goes. It asserted Astryx's private `--x-maxWidth` StyleX
output, so an upstream change of internal representation would fail it with no
product signal, and both regressions it covered — the prop dropped, the upstream
default changed — already fail the E2E, measured at 120px. One behaviour, one
test.
Comments lose what the code already says: the token block, the prop comment, and
the spec docblock each keep only the external fact a reader cannot derive, which
is that Astryx caps prose at 680px. The docblock also claimed a turn has one
right edge; `.maka-turn-lineage-row` and `.maka-turn-footer` cap at
`--maka-chat-measure` by design, so that claim would have sent the next reader
to "fix" them.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers. Both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
Wider, not narrower, because narrowing would undo #3617 and put code back in a
column too tight to read. The composer, hero and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero
and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
Which authority holds the measure is the caller's to say, so `contentWidth` is a
`Markdown` / `MarkdownBody` prop. The transcript turn passes `100%` and lets its
column govern. The two other callers — the Daily Review report and the Artifact
Preview — sit in containers that hold no measure of their own, so for them
Astryx's 680px cap IS the measure and they leave the prop alone.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container actually has a measure, and two did not.
Astryx renders a supplied `components.code` bare — no spacing, no width, no
alignment — and Maka always supplies one, so the Daily Review report and the
Artifact Preview were already showing prose at 680 with code blocks running the
full width of an uncapped page: the same two edges, one surface over. Both
containers now hold the measure, which is what the transcript column was doing
all along.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container has one, and the two document callers
did not. Astryx renders a supplied `components.code` bare — no spacing, no
width, no alignment — and Maka always supplies one, so on the Daily Review
report, which sits on an uncapped module page, prose stopped at 680 while the
code blocks inside it ran the width of the window. The report column holds the
measure now, and it is the column and not the prose inside it: a section is a
heading, a divider and its prose, so capping only the prose would have left the
other two running past it. The Artifact Preview pane caps itself at 600px and so
never showed this in the normal layout; it holds the measure for the stacked
layout a narrow window switches to, where the workbar drops that cap.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
The Artifact Preview comment loses a number for the same reason. It had written
the workbar's 600px cap out as a literal, which is a second copy of a value
`SESSION_WORKBAR_MAX_WIDTH` already owns and nothing keeps in sync; it names the
constant instead.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. #3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo #3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs #3617
Generated-by: Claude Code
saltand pushed a commit to saltand/maka-agent that referenced this pull request Aug 31, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. apache#3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo apache#3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs apache#3617
Generated-by: Claude Code
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@liugddx@Astro-Han
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' fix(desktop): widen transcript code blocks by liugddx · Pull Request #3617 · apache/maka · GitHub
Skip to content

fix(desktop): widen transcript code blocks - #3617

Merged
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure
Aug 24, 2026
Merged

fix(desktop): widen transcript code blocks#3617
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure

Conversation

@liugddx

@liugddxliugddx commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Keep the shared desktop --maka-chat-measure at 680px, so composer, header notices, hero, interaction, plan, agent-graph, and WorkHub surfaces do not change width.
  • Add a transcript-only 800px measure, matching the Astryx AI Chat conversation message area without adopting the unrelated spacious padding and mask semantics.
  • Preserve the Astryx Markdown 680px prose measure while allowing code cards to fill the 800px transcript container instead of retaining the 400px fit-content floor.
  • Add a focused transcript code-block Storybook scenario for visual review.

Screenshots

Before — 680px transcript/code card:

Code block at the previous 680px transcript measure

After — 800px transcript/code card, with prose still capped at 680px:

Code block at the scoped 800px transcript measure

Scope check

  • --maka-chat-measure: unchanged at 680px.
  • --maka-transcript-measure: 800px, with one runtime consumer: .maka-turn.
  • Measured in the rendered Storybook DOM: turn 800px; Markdown heading/prose measure 680px; code card 800px.
  • Narrow windows still resolve .maka-turn { width: 100% } against available inline space.

Verification

  • npm run lint — 2660 files, passed.
  • npm run format:check — 1605 files, passed.
  • npm --workspace @maka/desktop run typecheck:stories — passed.
  • npm --workspace @maka/desktop run build-storybook — passed.
  • npm --workspace @maka/ui test — 226 passed, 0 failed.
  • Storybook transcript code-block scenario rendered at 680px and 800px; both screenshots were visually checked at the same 1200×600 CSS-pixel viewport.
  • Full workspace build is currently blocked by the latest upstream main baseline: packages/storage/src/__tests__/codex-session-adapter.test.ts:267 references missing decodeStoredMessage. The same failure occurs in upstream main CI run 32664680331; this PR does not alter that file.

AI use

Select exactly one:

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

Tool(s) and scope: Codex inspected the reviewer feedback and Astryx package behavior, narrowed the global change to a transcript-only measure, updated the implementation and visual evidence, synchronized current main, and ran verification.

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

@liugddxliugddx changed the title fix(desktop): widen the chat reading measurefix(desktop): widen transcript code blocksAug 23, 2026
Astro-Han
Astro-Han previously approved these changes Aug 23, 2026

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed exact head 9fe8ec4. Coverage: the shared 680→880px desktop chat measure across transcript, composer, header, hero, interaction/plan/agent-graph consumers and their responsive caps; Markdown CodeBlock width behavior for single-line and multiline fences; Storybook scenario and supplied before/after evidence. Exclusions: live Electron interaction at multiple OS scaling factors and exhaustive visual review of every shared-measure consumer. Local UI→Desktop builds passed and the full UI suite is 217/217 green; hosted exact-head test is green. No P0–P3 findings. The branch is 24 commits behind current main; a current-main merge-tree probe is clean.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up on the already-published approval, raised by a maintainer after it went out. Not a defect claim and not a retraction of the approval — a request for evidence proportional to the change surface.

The diff is small, but this line is not transcript-scoped. --maka-chat-measure lives on :root and is consumed by the transcript, composer, header, onboarding hero, and the interaction / plan / agent-graph surfaces. Moving it 680px -> 880px is a global layout change delivered through a five-file diff, so fix(desktop): widen transcript code blocks understates what lands.

The existing review verified that every consumer caps itself at the available inline size and that no surface overflows, and it explicitly excluded exhaustive visual regression across those consumers and real multi-scale-factor Electron interaction. That exclusion is exactly where a 200px widening carries its risk: the logical claim has evidence, the appearance claim does not.

Two things would close it:

  1. Before/after screenshots for the other --maka-chat-measure consumers, not only the transcript code block — composer, header, hero, and the interaction / plan / agent-graph surfaces. The two screenshots in this PR cover the motivating case only.
  2. Either retitle to reflect a global measure change, or split the :root token change into its own PR so the transcript fix can land on its own evidence.

Separately, we are checking what width the upstream Astryx template recommends for an AI chat surface. If the official guidance names a value, this token should agree with it rather than being chosen independently; we will post that finding here when we have it.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up with the upstream comparison promised in the previous comment. The 880px value has no Astryx basis, and the closest official AI-chat figure is 800px. I verified this against the vendored package rather than taking it second-hand.

  • @astryxdesign/cli/assets/templates/pages/ai-chat/page.tsx — the official "AI Chat Conversation" page renders <ChatLayout density="spacious">.
  • @astryxdesign/core/src/Chat/ChatLayout.tsx — for that density, both messageAreaSpacious and dockInnerSpacious are capped at maxWidth: 800. That single value bounds the transcript and the composer, which makes it the closest upstream analogue to this repo's shared --maka-chat-measure.

Two nearby values are not an AI-chat recommendation and should not be cited as one:

  • Markdown.tsx defaults contentWidth to 680px, but its own documentation scopes that to paragraphs, headings, lists and blockquotes; tables and code blocks are explicitly allowed to fill the container. So 680 is a prose measure, not a transcript/composer width — and notably, upstream's answer to "code fences look cramped" is that code is already exempt from the prose measure, not that the prose measure should grow.
  • pages/ai-chat-landing/page.tsx uses contentWidth={720}, but that is the landing/greeting surface, not a conversation transcript.

The theme-neutral package ships no chat or prose width token, and neither this repo's Astryx alignment audits nor the vendored patch mention 880 or anything equivalent.

So the accurate statement is: upstream picked 800 for a conversation surface, 680 for prose, and 880 is this project's own product judgement. That is a legitimate thing to decide — but it has to be carried by product evidence, not by an implied upstream endorsement, and the evidence should cover every --maka-chat-measure consumer rather than the code-block case alone.

On process: the earlier approval on this PR was published before this comparison existed, and the reviewer who issued it has since said it was too strong to stand as merge evidence. This repository does not dismiss reviews, so that approval cannot be withdrawn mechanically — please treat this comment as superseding it. Nothing here is a defect claim about the code; it is a request that the change surface and the evidence match before this lands.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

补一条来自 Astryx 官方值的建议(承接前面关于「官方模板宽度是多少」的问题)。

查了 vendored 的 @astryxdesign/core/src/Chat/ChatLayout.tsx:官方 AI Chat Conversation 这一档的宽度是 800pxmessageAreaSpacious { maxWidth: 800 } / dockInnerSpacious { maxWidth: 800 }),而当前仓库用的 balanced 档两者都是 maxWidth: '100%'(不设上限)。所以 880 不是官方值,800 才是。

另外有人提过「直接切 <ChatLayout density=\"spacious\">」这条路,我核过之后认为它单独不成立,两个原因:

  1. spacious 不是一个纯宽度旋钮:它同时把消息区 paddingInline 0 → --spacing-4、dock 边距 --spacing-3--spacing-4、顶部渐隐 100px → 120px、mask ramp 36px → 48px。是一整档间距语义。
  2. 覆盖面不够:ChatLayout 只拥有转录区和输入坞内层两处。--maka-chat-measure 的其余消费点(composer.csshero.cssinteraction-prompts.cssplan-mode.csschat-header.cssagent-graph.csspackages/ui/src/styles.css)都是纯 CSS,不经过 ChatLayout,切 density 之后它们仍停在旧值,界面上会出现两套并存的量度。

这不改变之前那条请求(需要补齐所有消费面的前后对比);只是把「取哪个数」这一项收敛掉了。

Comment threadapps/desktop/src/renderer/maka-tokens.css Outdated
@Astro-Han
Astro-Han dismissed their stale reviewAugust 23, 2026 18:24

Withdrawing this approval. It was submitted before the review of this PR was complete, and the same reviewer retracted it in a follow-up comment shortly afterwards. Two blocking concerns remain open on this exact head: the before/after evidence across every --maka-chat-measure consumer has not been supplied, and the chosen 880px has no upstream basis (Astryx's official AI Chat Conversation width is 800px). Leaving a green approval attached to this head would misrepresent the review state.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Addressed the follow-up at exact head 0000bc544fa9949740a73ae4cf3f464d6e8c2acd.

Scope decision

I took the scope-reduction option rather than widening the shared token:

  • --maka-chat-measure is restored to and remains at 680px.
  • A new --maka-transcript-measure: 800px has exactly one runtime consumer: .maka-turn.
  • Composer, header notices, hero, interaction, plan, agent-graph, and the new WorkHub consumer therefore keep their existing 680px behavior; no before/after evidence is needed for surfaces this PR no longer changes.
  • The 800px value follows the Astryx AI Chat conversation message-area value. This does not switch to density="spacious", so Maka keeps its existing balanced padding, dock margin, and mask semantics.

This also makes the existing title accurate again: the delivered layout change is transcript-scoped.

Rendered evidence

At the same 1200×600 CSS-pixel Storybook viewport:

  • before: transcript turn / code card = 680px;
  • after: transcript turn = 800px, Markdown prose heading remains 680px, code card = 800px;
  • the code card now fills the transcript via CodeBlock width="100%" instead of Astryx fit-content with its 400px floor.

The PR description now contains regenerated, same-viewport before/after screenshots for the scoped change.

Verification

  • npm run lint — 2660 files passed
  • npm run format:check — 1605 files passed
  • npm --workspace @maka/desktop run typecheck:stories — passed
  • npm --workspace @maka/desktop run build-storybook — passed
  • npm --workspace @maka/ui test — 226 passed, 0 failed
  • git diff --check — passed

Baseline note: the full workspace build currently fails on latest upstream main at packages/storage/src/__tests__/codex-session-adapter.test.ts:267 because decodeStoredMessage is undefined. Upstream main CI run 32664680331 has the same failure; this PR does not touch that path.

Please re-review this exact head.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving at a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

The [P2] I raised earlier — the transcript measure token — is fixed at this head: --maka-chat-measure is 680px, --maka-transcript-measure is 800px scoped to .maka-turn, and 880 no longer appears anywhere in maka-tokens.css. That thread is resolved.

Gate at this exact head: hosted test is terminal green (all 38 steps, including Desktop e2e, Browser WebContentsView smoke, Alignment audit, Storybook build and smoke, and the CLI candidate build and validation). Zero unresolved review threads. No APPROVED review is bound to an older commit — the one prior approval was dismissed and has not been re-issued.

Approval only; merging is a human's call.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Synced main at 3bb645e99 into this branch in merge commit a8f65f508.

The merge brings in the upstream #3656 storage test fix (decodeStoredMessage -> the canonical decoder); it does not change this PR's five-file UI/Storybook diff. The previous CI failure was exactly that upstream storage compile error.

Fresh verification is green:

  • CI test 32682456425 passed in 16m15s.
  • The run passed build, release contracts, typecheck, affected workspace tests, Runtime Host tests, Desktop E2E, Storybook build/smoke, and installed CLI validation.

The PR is ready for review at exact head a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

@Astro-Han

Copy link
Copy Markdown
Contributor

One comment-wording request and then this is good to go — the code itself is fine.

The new token comment reads as though 800px were an Astryx-mandated value:

Astryx's AI Chat conversation uses an 800px message area…

That is true only at Astryx's spacious density. Maka's chat surface runs at balanced (packages/ui/src/chat-surface-layout.tsx:37, deliberately letting Astryx's own @default 'balanced' stand), and at balanced — as at compact — the message area resolves to max-width: 100%. Astryx hands width to the host at that density rather than prescribing one.

So 800px is Maka's own choice here, not conformance to an upstream rule. That is a perfectly good choice — it matches the reading width Astryx picks for spacious — but the comment should say so, otherwise a future reader will treat the number as untouchable upstream policy.

Suggested rewording, roughly: at balanced density Astryx leaves the message area at max-width: 100% and delegates width to the host; Maka sets its transcript measure to 800px, matching the value Astryx uses at spacious, while prose stays at 680px and code/tables fill the wider container.

Keep the value; just retire the attribution.

中文

只有一处注释措辞需要改,代码本身没问题。

新加的 token 注释写成了"Astryx 的 AI Chat 会话使用 800px 消息区",这句话只在 Astryx 的 spacious 密度下成立。Maka 的聊天面跑在 balanced(见 packages/ui/src/chat-surface-layout.tsx:37,当初就是特意让 Astryx 自己的 @default 'balanced' 生效),而 balanced 与 compact 一样,消息区解析为 max-width: 100%——在这个密度下 Astryx 把宽度交给宿主,并没有规定值。

所以 800px 是 Maka 自己的选择,而不是对上游规范的遵循。这个选择没问题(它正好等于 Astryx 在 spacious 下采用的阅读宽度),但注释应当如实说明,否则后来的人会把这个数字当成不可改动的上游政策。

建议改成大意如下:balanced 密度下 Astryx 将消息区保持在 max-width: 100% 并把宽度交给宿主;Maka 自行将 transcript 宽度定为 800px,与 Astryx 在 spacious 下的取值一致,同时 prose 仍为 680px,代码与表格填满容器。

值保留,去掉冒称上游规定的说法即可。

@Astro-Han

Copy link
Copy Markdown
Contributor

LGTM — merging. Thanks for narrowing this to a transcript-scoped token instead of widening the shared measure, and for writing the 800px provenance into the file.

中文

看过了,合并。感谢改成 transcript 范围的单独 token 而不是加宽共享量度,也感谢把 800px 的来源写进了文件里。

@Astro-Han
Astro-Han merged commit aed0a65 into apache:mainAug 24, 2026
1 check passed
Astro-Han added a commit that referenced this pull request Aug 27, 2026
Adversarial review of the previous two commits, on the simplicity axis only.
The unit contract goes. It asserted Astryx's private `--x-maxWidth` StyleX
output, so an upstream change of internal representation would fail it with no
product signal, and both regressions it covered — the prop dropped, the upstream
default changed — already fail the E2E, measured at 120px. One behaviour, one
test.
Comments lose what the code already says: the token block, the prop comment, and
the spec docblock each keep only the external fact a reader cannot derive, which
is that Astryx caps prose at 680px. The docblock also claimed a turn has one
right edge; `.maka-turn-lineage-row` and `.maka-turn-footer` cap at
`--maka-chat-measure` by design, so that claim would have sent the next reader
to "fix" them.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers. Both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
Wider, not narrower, because narrowing would undo #3617 and put code back in a
column too tight to read. The composer, hero and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero
and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
Which authority holds the measure is the caller's to say, so `contentWidth` is a
`Markdown` / `MarkdownBody` prop. The transcript turn passes `100%` and lets its
column govern. The two other callers — the Daily Review report and the Artifact
Preview — sit in containers that hold no measure of their own, so for them
Astryx's 680px cap IS the measure and they leave the prop alone.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container actually has a measure, and two did not.
Astryx renders a supplied `components.code` bare — no spacing, no width, no
alignment — and Maka always supplies one, so the Daily Review report and the
Artifact Preview were already showing prose at 680 with code blocks running the
full width of an uncapped page: the same two edges, one surface over. Both
containers now hold the measure, which is what the transcript column was doing
all along.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container has one, and the two document callers
did not. Astryx renders a supplied `components.code` bare — no spacing, no
width, no alignment — and Maka always supplies one, so on the Daily Review
report, which sits on an uncapped module page, prose stopped at 680 while the
code blocks inside it ran the width of the window. The report column holds the
measure now, and it is the column and not the prose inside it: a section is a
heading, a divider and its prose, so capping only the prose would have left the
other two running past it. The Artifact Preview pane caps itself at 600px and so
never showed this in the normal layout; it holds the measure for the stacked
layout a narrow window switches to, where the workbar drops that cap.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
The Artifact Preview comment loses a number for the same reason. It had written
the workbar's 600px cap out as a literal, which is a second copy of a value
`SESSION_WORKBAR_MAX_WIDTH` already owns and nothing keeps in sync; it names the
constant instead.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. #3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo #3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs #3617
Generated-by: Claude Code
saltand pushed a commit to saltand/maka-agent that referenced this pull request Aug 31, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. apache#3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo apache#3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs apache#3617
Generated-by: Claude Code
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@liugddx@Astro-Han
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', '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('^' + ".*" + ' fix(desktop): widen transcript code blocks by liugddx · Pull Request #3617 · apache/maka · GitHub
Skip to content

fix(desktop): widen transcript code blocks - #3617

Merged
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure
Aug 24, 2026
Merged

fix(desktop): widen transcript code blocks#3617
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure

Conversation

@liugddx

@liugddxliugddx commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Keep the shared desktop --maka-chat-measure at 680px, so composer, header notices, hero, interaction, plan, agent-graph, and WorkHub surfaces do not change width.
  • Add a transcript-only 800px measure, matching the Astryx AI Chat conversation message area without adopting the unrelated spacious padding and mask semantics.
  • Preserve the Astryx Markdown 680px prose measure while allowing code cards to fill the 800px transcript container instead of retaining the 400px fit-content floor.
  • Add a focused transcript code-block Storybook scenario for visual review.

Screenshots

Before — 680px transcript/code card:

Code block at the previous 680px transcript measure

After — 800px transcript/code card, with prose still capped at 680px:

Code block at the scoped 800px transcript measure

Scope check

  • --maka-chat-measure: unchanged at 680px.
  • --maka-transcript-measure: 800px, with one runtime consumer: .maka-turn.
  • Measured in the rendered Storybook DOM: turn 800px; Markdown heading/prose measure 680px; code card 800px.
  • Narrow windows still resolve .maka-turn { width: 100% } against available inline space.

Verification

  • npm run lint — 2660 files, passed.
  • npm run format:check — 1605 files, passed.
  • npm --workspace @maka/desktop run typecheck:stories — passed.
  • npm --workspace @maka/desktop run build-storybook — passed.
  • npm --workspace @maka/ui test — 226 passed, 0 failed.
  • Storybook transcript code-block scenario rendered at 680px and 800px; both screenshots were visually checked at the same 1200×600 CSS-pixel viewport.
  • Full workspace build is currently blocked by the latest upstream main baseline: packages/storage/src/__tests__/codex-session-adapter.test.ts:267 references missing decodeStoredMessage. The same failure occurs in upstream main CI run 32664680331; this PR does not alter that file.

AI use

Select exactly one:

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

Tool(s) and scope: Codex inspected the reviewer feedback and Astryx package behavior, narrowed the global change to a transcript-only measure, updated the implementation and visual evidence, synchronized current main, and ran verification.

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

@liugddxliugddx changed the title fix(desktop): widen the chat reading measurefix(desktop): widen transcript code blocksAug 23, 2026
Astro-Han
Astro-Han previously approved these changes Aug 23, 2026

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed exact head 9fe8ec4. Coverage: the shared 680→880px desktop chat measure across transcript, composer, header, hero, interaction/plan/agent-graph consumers and their responsive caps; Markdown CodeBlock width behavior for single-line and multiline fences; Storybook scenario and supplied before/after evidence. Exclusions: live Electron interaction at multiple OS scaling factors and exhaustive visual review of every shared-measure consumer. Local UI→Desktop builds passed and the full UI suite is 217/217 green; hosted exact-head test is green. No P0–P3 findings. The branch is 24 commits behind current main; a current-main merge-tree probe is clean.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up on the already-published approval, raised by a maintainer after it went out. Not a defect claim and not a retraction of the approval — a request for evidence proportional to the change surface.

The diff is small, but this line is not transcript-scoped. --maka-chat-measure lives on :root and is consumed by the transcript, composer, header, onboarding hero, and the interaction / plan / agent-graph surfaces. Moving it 680px -> 880px is a global layout change delivered through a five-file diff, so fix(desktop): widen transcript code blocks understates what lands.

The existing review verified that every consumer caps itself at the available inline size and that no surface overflows, and it explicitly excluded exhaustive visual regression across those consumers and real multi-scale-factor Electron interaction. That exclusion is exactly where a 200px widening carries its risk: the logical claim has evidence, the appearance claim does not.

Two things would close it:

  1. Before/after screenshots for the other --maka-chat-measure consumers, not only the transcript code block — composer, header, hero, and the interaction / plan / agent-graph surfaces. The two screenshots in this PR cover the motivating case only.
  2. Either retitle to reflect a global measure change, or split the :root token change into its own PR so the transcript fix can land on its own evidence.

Separately, we are checking what width the upstream Astryx template recommends for an AI chat surface. If the official guidance names a value, this token should agree with it rather than being chosen independently; we will post that finding here when we have it.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up with the upstream comparison promised in the previous comment. The 880px value has no Astryx basis, and the closest official AI-chat figure is 800px. I verified this against the vendored package rather than taking it second-hand.

  • @astryxdesign/cli/assets/templates/pages/ai-chat/page.tsx — the official "AI Chat Conversation" page renders <ChatLayout density="spacious">.
  • @astryxdesign/core/src/Chat/ChatLayout.tsx — for that density, both messageAreaSpacious and dockInnerSpacious are capped at maxWidth: 800. That single value bounds the transcript and the composer, which makes it the closest upstream analogue to this repo's shared --maka-chat-measure.

Two nearby values are not an AI-chat recommendation and should not be cited as one:

  • Markdown.tsx defaults contentWidth to 680px, but its own documentation scopes that to paragraphs, headings, lists and blockquotes; tables and code blocks are explicitly allowed to fill the container. So 680 is a prose measure, not a transcript/composer width — and notably, upstream's answer to "code fences look cramped" is that code is already exempt from the prose measure, not that the prose measure should grow.
  • pages/ai-chat-landing/page.tsx uses contentWidth={720}, but that is the landing/greeting surface, not a conversation transcript.

The theme-neutral package ships no chat or prose width token, and neither this repo's Astryx alignment audits nor the vendored patch mention 880 or anything equivalent.

So the accurate statement is: upstream picked 800 for a conversation surface, 680 for prose, and 880 is this project's own product judgement. That is a legitimate thing to decide — but it has to be carried by product evidence, not by an implied upstream endorsement, and the evidence should cover every --maka-chat-measure consumer rather than the code-block case alone.

On process: the earlier approval on this PR was published before this comparison existed, and the reviewer who issued it has since said it was too strong to stand as merge evidence. This repository does not dismiss reviews, so that approval cannot be withdrawn mechanically — please treat this comment as superseding it. Nothing here is a defect claim about the code; it is a request that the change surface and the evidence match before this lands.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

补一条来自 Astryx 官方值的建议(承接前面关于「官方模板宽度是多少」的问题)。

查了 vendored 的 @astryxdesign/core/src/Chat/ChatLayout.tsx:官方 AI Chat Conversation 这一档的宽度是 800pxmessageAreaSpacious { maxWidth: 800 } / dockInnerSpacious { maxWidth: 800 }),而当前仓库用的 balanced 档两者都是 maxWidth: '100%'(不设上限)。所以 880 不是官方值,800 才是。

另外有人提过「直接切 <ChatLayout density=\"spacious\">」这条路,我核过之后认为它单独不成立,两个原因:

  1. spacious 不是一个纯宽度旋钮:它同时把消息区 paddingInline 0 → --spacing-4、dock 边距 --spacing-3--spacing-4、顶部渐隐 100px → 120px、mask ramp 36px → 48px。是一整档间距语义。
  2. 覆盖面不够:ChatLayout 只拥有转录区和输入坞内层两处。--maka-chat-measure 的其余消费点(composer.csshero.cssinteraction-prompts.cssplan-mode.csschat-header.cssagent-graph.csspackages/ui/src/styles.css)都是纯 CSS,不经过 ChatLayout,切 density 之后它们仍停在旧值,界面上会出现两套并存的量度。

这不改变之前那条请求(需要补齐所有消费面的前后对比);只是把「取哪个数」这一项收敛掉了。

Comment threadapps/desktop/src/renderer/maka-tokens.css Outdated
@Astro-Han
Astro-Han dismissed their stale reviewAugust 23, 2026 18:24

Withdrawing this approval. It was submitted before the review of this PR was complete, and the same reviewer retracted it in a follow-up comment shortly afterwards. Two blocking concerns remain open on this exact head: the before/after evidence across every --maka-chat-measure consumer has not been supplied, and the chosen 880px has no upstream basis (Astryx's official AI Chat Conversation width is 800px). Leaving a green approval attached to this head would misrepresent the review state.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Addressed the follow-up at exact head 0000bc544fa9949740a73ae4cf3f464d6e8c2acd.

Scope decision

I took the scope-reduction option rather than widening the shared token:

  • --maka-chat-measure is restored to and remains at 680px.
  • A new --maka-transcript-measure: 800px has exactly one runtime consumer: .maka-turn.
  • Composer, header notices, hero, interaction, plan, agent-graph, and the new WorkHub consumer therefore keep their existing 680px behavior; no before/after evidence is needed for surfaces this PR no longer changes.
  • The 800px value follows the Astryx AI Chat conversation message-area value. This does not switch to density="spacious", so Maka keeps its existing balanced padding, dock margin, and mask semantics.

This also makes the existing title accurate again: the delivered layout change is transcript-scoped.

Rendered evidence

At the same 1200×600 CSS-pixel Storybook viewport:

  • before: transcript turn / code card = 680px;
  • after: transcript turn = 800px, Markdown prose heading remains 680px, code card = 800px;
  • the code card now fills the transcript via CodeBlock width="100%" instead of Astryx fit-content with its 400px floor.

The PR description now contains regenerated, same-viewport before/after screenshots for the scoped change.

Verification

  • npm run lint — 2660 files passed
  • npm run format:check — 1605 files passed
  • npm --workspace @maka/desktop run typecheck:stories — passed
  • npm --workspace @maka/desktop run build-storybook — passed
  • npm --workspace @maka/ui test — 226 passed, 0 failed
  • git diff --check — passed

Baseline note: the full workspace build currently fails on latest upstream main at packages/storage/src/__tests__/codex-session-adapter.test.ts:267 because decodeStoredMessage is undefined. Upstream main CI run 32664680331 has the same failure; this PR does not touch that path.

Please re-review this exact head.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving at a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

The [P2] I raised earlier — the transcript measure token — is fixed at this head: --maka-chat-measure is 680px, --maka-transcript-measure is 800px scoped to .maka-turn, and 880 no longer appears anywhere in maka-tokens.css. That thread is resolved.

Gate at this exact head: hosted test is terminal green (all 38 steps, including Desktop e2e, Browser WebContentsView smoke, Alignment audit, Storybook build and smoke, and the CLI candidate build and validation). Zero unresolved review threads. No APPROVED review is bound to an older commit — the one prior approval was dismissed and has not been re-issued.

Approval only; merging is a human's call.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Synced main at 3bb645e99 into this branch in merge commit a8f65f508.

The merge brings in the upstream #3656 storage test fix (decodeStoredMessage -> the canonical decoder); it does not change this PR's five-file UI/Storybook diff. The previous CI failure was exactly that upstream storage compile error.

Fresh verification is green:

  • CI test 32682456425 passed in 16m15s.
  • The run passed build, release contracts, typecheck, affected workspace tests, Runtime Host tests, Desktop E2E, Storybook build/smoke, and installed CLI validation.

The PR is ready for review at exact head a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

@Astro-Han

Copy link
Copy Markdown
Contributor

One comment-wording request and then this is good to go — the code itself is fine.

The new token comment reads as though 800px were an Astryx-mandated value:

Astryx's AI Chat conversation uses an 800px message area…

That is true only at Astryx's spacious density. Maka's chat surface runs at balanced (packages/ui/src/chat-surface-layout.tsx:37, deliberately letting Astryx's own @default 'balanced' stand), and at balanced — as at compact — the message area resolves to max-width: 100%. Astryx hands width to the host at that density rather than prescribing one.

So 800px is Maka's own choice here, not conformance to an upstream rule. That is a perfectly good choice — it matches the reading width Astryx picks for spacious — but the comment should say so, otherwise a future reader will treat the number as untouchable upstream policy.

Suggested rewording, roughly: at balanced density Astryx leaves the message area at max-width: 100% and delegates width to the host; Maka sets its transcript measure to 800px, matching the value Astryx uses at spacious, while prose stays at 680px and code/tables fill the wider container.

Keep the value; just retire the attribution.

中文

只有一处注释措辞需要改,代码本身没问题。

新加的 token 注释写成了"Astryx 的 AI Chat 会话使用 800px 消息区",这句话只在 Astryx 的 spacious 密度下成立。Maka 的聊天面跑在 balanced(见 packages/ui/src/chat-surface-layout.tsx:37,当初就是特意让 Astryx 自己的 @default 'balanced' 生效),而 balanced 与 compact 一样,消息区解析为 max-width: 100%——在这个密度下 Astryx 把宽度交给宿主,并没有规定值。

所以 800px 是 Maka 自己的选择,而不是对上游规范的遵循。这个选择没问题(它正好等于 Astryx 在 spacious 下采用的阅读宽度),但注释应当如实说明,否则后来的人会把这个数字当成不可改动的上游政策。

建议改成大意如下:balanced 密度下 Astryx 将消息区保持在 max-width: 100% 并把宽度交给宿主;Maka 自行将 transcript 宽度定为 800px,与 Astryx 在 spacious 下的取值一致,同时 prose 仍为 680px,代码与表格填满容器。

值保留,去掉冒称上游规定的说法即可。

@Astro-Han

Copy link
Copy Markdown
Contributor

LGTM — merging. Thanks for narrowing this to a transcript-scoped token instead of widening the shared measure, and for writing the 800px provenance into the file.

中文

看过了,合并。感谢改成 transcript 范围的单独 token 而不是加宽共享量度,也感谢把 800px 的来源写进了文件里。

@Astro-Han
Astro-Han merged commit aed0a65 into apache:mainAug 24, 2026
1 check passed
Astro-Han added a commit that referenced this pull request Aug 27, 2026
Adversarial review of the previous two commits, on the simplicity axis only.
The unit contract goes. It asserted Astryx's private `--x-maxWidth` StyleX
output, so an upstream change of internal representation would fail it with no
product signal, and both regressions it covered — the prop dropped, the upstream
default changed — already fail the E2E, measured at 120px. One behaviour, one
test.
Comments lose what the code already says: the token block, the prop comment, and
the spec docblock each keep only the external fact a reader cannot derive, which
is that Astryx caps prose at 680px. The docblock also claimed a turn has one
right edge; `.maka-turn-lineage-row` and `.maka-turn-footer` cap at
`--maka-chat-measure` by design, so that claim would have sent the next reader
to "fix" them.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers. Both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
Wider, not narrower, because narrowing would undo #3617 and put code back in a
column too tight to read. The composer, hero and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero
and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
Which authority holds the measure is the caller's to say, so `contentWidth` is a
`Markdown` / `MarkdownBody` prop. The transcript turn passes `100%` and lets its
column govern. The two other callers — the Daily Review report and the Artifact
Preview — sit in containers that hold no measure of their own, so for them
Astryx's 680px cap IS the measure and they leave the prop alone.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container actually has a measure, and two did not.
Astryx renders a supplied `components.code` bare — no spacing, no width, no
alignment — and Maka always supplies one, so the Daily Review report and the
Artifact Preview were already showing prose at 680 with code blocks running the
full width of an uncapped page: the same two edges, one surface over. Both
containers now hold the measure, which is what the transcript column was doing
all along.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container has one, and the two document callers
did not. Astryx renders a supplied `components.code` bare — no spacing, no
width, no alignment — and Maka always supplies one, so on the Daily Review
report, which sits on an uncapped module page, prose stopped at 680 while the
code blocks inside it ran the width of the window. The report column holds the
measure now, and it is the column and not the prose inside it: a section is a
heading, a divider and its prose, so capping only the prose would have left the
other two running past it. The Artifact Preview pane caps itself at 600px and so
never showed this in the normal layout; it holds the measure for the stacked
layout a narrow window switches to, where the workbar drops that cap.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
The Artifact Preview comment loses a number for the same reason. It had written
the workbar's 600px cap out as a literal, which is a second copy of a value
`SESSION_WORKBAR_MAX_WIDTH` already owns and nothing keeps in sync; it names the
constant instead.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. #3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo #3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs #3617
Generated-by: Claude Code
saltand pushed a commit to saltand/maka-agent that referenced this pull request Aug 31, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. apache#3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo apache#3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs apache#3617
Generated-by: Claude Code
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@liugddx@Astro-Han
, '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" + ' fix(desktop): widen transcript code blocks by liugddx · Pull Request #3617 · apache/maka · GitHub
Skip to content

fix(desktop): widen transcript code blocks - #3617

Merged
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure
Aug 24, 2026
Merged

fix(desktop): widen transcript code blocks#3617
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure

Conversation

@liugddx

@liugddxliugddx commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Keep the shared desktop --maka-chat-measure at 680px, so composer, header notices, hero, interaction, plan, agent-graph, and WorkHub surfaces do not change width.
  • Add a transcript-only 800px measure, matching the Astryx AI Chat conversation message area without adopting the unrelated spacious padding and mask semantics.
  • Preserve the Astryx Markdown 680px prose measure while allowing code cards to fill the 800px transcript container instead of retaining the 400px fit-content floor.
  • Add a focused transcript code-block Storybook scenario for visual review.

Screenshots

Before — 680px transcript/code card:

Code block at the previous 680px transcript measure

After — 800px transcript/code card, with prose still capped at 680px:

Code block at the scoped 800px transcript measure

Scope check

  • --maka-chat-measure: unchanged at 680px.
  • --maka-transcript-measure: 800px, with one runtime consumer: .maka-turn.
  • Measured in the rendered Storybook DOM: turn 800px; Markdown heading/prose measure 680px; code card 800px.
  • Narrow windows still resolve .maka-turn { width: 100% } against available inline space.

Verification

  • npm run lint — 2660 files, passed.
  • npm run format:check — 1605 files, passed.
  • npm --workspace @maka/desktop run typecheck:stories — passed.
  • npm --workspace @maka/desktop run build-storybook — passed.
  • npm --workspace @maka/ui test — 226 passed, 0 failed.
  • Storybook transcript code-block scenario rendered at 680px and 800px; both screenshots were visually checked at the same 1200×600 CSS-pixel viewport.
  • Full workspace build is currently blocked by the latest upstream main baseline: packages/storage/src/__tests__/codex-session-adapter.test.ts:267 references missing decodeStoredMessage. The same failure occurs in upstream main CI run 32664680331; this PR does not alter that file.

AI use

Select exactly one:

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

Tool(s) and scope: Codex inspected the reviewer feedback and Astryx package behavior, narrowed the global change to a transcript-only measure, updated the implementation and visual evidence, synchronized current main, and ran verification.

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

@liugddxliugddx changed the title fix(desktop): widen the chat reading measurefix(desktop): widen transcript code blocksAug 23, 2026
Astro-Han
Astro-Han previously approved these changes Aug 23, 2026

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed exact head 9fe8ec4. Coverage: the shared 680→880px desktop chat measure across transcript, composer, header, hero, interaction/plan/agent-graph consumers and their responsive caps; Markdown CodeBlock width behavior for single-line and multiline fences; Storybook scenario and supplied before/after evidence. Exclusions: live Electron interaction at multiple OS scaling factors and exhaustive visual review of every shared-measure consumer. Local UI→Desktop builds passed and the full UI suite is 217/217 green; hosted exact-head test is green. No P0–P3 findings. The branch is 24 commits behind current main; a current-main merge-tree probe is clean.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up on the already-published approval, raised by a maintainer after it went out. Not a defect claim and not a retraction of the approval — a request for evidence proportional to the change surface.

The diff is small, but this line is not transcript-scoped. --maka-chat-measure lives on :root and is consumed by the transcript, composer, header, onboarding hero, and the interaction / plan / agent-graph surfaces. Moving it 680px -> 880px is a global layout change delivered through a five-file diff, so fix(desktop): widen transcript code blocks understates what lands.

The existing review verified that every consumer caps itself at the available inline size and that no surface overflows, and it explicitly excluded exhaustive visual regression across those consumers and real multi-scale-factor Electron interaction. That exclusion is exactly where a 200px widening carries its risk: the logical claim has evidence, the appearance claim does not.

Two things would close it:

  1. Before/after screenshots for the other --maka-chat-measure consumers, not only the transcript code block — composer, header, hero, and the interaction / plan / agent-graph surfaces. The two screenshots in this PR cover the motivating case only.
  2. Either retitle to reflect a global measure change, or split the :root token change into its own PR so the transcript fix can land on its own evidence.

Separately, we are checking what width the upstream Astryx template recommends for an AI chat surface. If the official guidance names a value, this token should agree with it rather than being chosen independently; we will post that finding here when we have it.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up with the upstream comparison promised in the previous comment. The 880px value has no Astryx basis, and the closest official AI-chat figure is 800px. I verified this against the vendored package rather than taking it second-hand.

  • @astryxdesign/cli/assets/templates/pages/ai-chat/page.tsx — the official "AI Chat Conversation" page renders <ChatLayout density="spacious">.
  • @astryxdesign/core/src/Chat/ChatLayout.tsx — for that density, both messageAreaSpacious and dockInnerSpacious are capped at maxWidth: 800. That single value bounds the transcript and the composer, which makes it the closest upstream analogue to this repo's shared --maka-chat-measure.

Two nearby values are not an AI-chat recommendation and should not be cited as one:

  • Markdown.tsx defaults contentWidth to 680px, but its own documentation scopes that to paragraphs, headings, lists and blockquotes; tables and code blocks are explicitly allowed to fill the container. So 680 is a prose measure, not a transcript/composer width — and notably, upstream's answer to "code fences look cramped" is that code is already exempt from the prose measure, not that the prose measure should grow.
  • pages/ai-chat-landing/page.tsx uses contentWidth={720}, but that is the landing/greeting surface, not a conversation transcript.

The theme-neutral package ships no chat or prose width token, and neither this repo's Astryx alignment audits nor the vendored patch mention 880 or anything equivalent.

So the accurate statement is: upstream picked 800 for a conversation surface, 680 for prose, and 880 is this project's own product judgement. That is a legitimate thing to decide — but it has to be carried by product evidence, not by an implied upstream endorsement, and the evidence should cover every --maka-chat-measure consumer rather than the code-block case alone.

On process: the earlier approval on this PR was published before this comparison existed, and the reviewer who issued it has since said it was too strong to stand as merge evidence. This repository does not dismiss reviews, so that approval cannot be withdrawn mechanically — please treat this comment as superseding it. Nothing here is a defect claim about the code; it is a request that the change surface and the evidence match before this lands.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

补一条来自 Astryx 官方值的建议(承接前面关于「官方模板宽度是多少」的问题)。

查了 vendored 的 @astryxdesign/core/src/Chat/ChatLayout.tsx:官方 AI Chat Conversation 这一档的宽度是 800pxmessageAreaSpacious { maxWidth: 800 } / dockInnerSpacious { maxWidth: 800 }),而当前仓库用的 balanced 档两者都是 maxWidth: '100%'(不设上限)。所以 880 不是官方值,800 才是。

另外有人提过「直接切 <ChatLayout density=\"spacious\">」这条路,我核过之后认为它单独不成立,两个原因:

  1. spacious 不是一个纯宽度旋钮:它同时把消息区 paddingInline 0 → --spacing-4、dock 边距 --spacing-3--spacing-4、顶部渐隐 100px → 120px、mask ramp 36px → 48px。是一整档间距语义。
  2. 覆盖面不够:ChatLayout 只拥有转录区和输入坞内层两处。--maka-chat-measure 的其余消费点(composer.csshero.cssinteraction-prompts.cssplan-mode.csschat-header.cssagent-graph.csspackages/ui/src/styles.css)都是纯 CSS,不经过 ChatLayout,切 density 之后它们仍停在旧值,界面上会出现两套并存的量度。

这不改变之前那条请求(需要补齐所有消费面的前后对比);只是把「取哪个数」这一项收敛掉了。

Comment threadapps/desktop/src/renderer/maka-tokens.css Outdated
@Astro-Han
Astro-Han dismissed their stale reviewAugust 23, 2026 18:24

Withdrawing this approval. It was submitted before the review of this PR was complete, and the same reviewer retracted it in a follow-up comment shortly afterwards. Two blocking concerns remain open on this exact head: the before/after evidence across every --maka-chat-measure consumer has not been supplied, and the chosen 880px has no upstream basis (Astryx's official AI Chat Conversation width is 800px). Leaving a green approval attached to this head would misrepresent the review state.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Addressed the follow-up at exact head 0000bc544fa9949740a73ae4cf3f464d6e8c2acd.

Scope decision

I took the scope-reduction option rather than widening the shared token:

  • --maka-chat-measure is restored to and remains at 680px.
  • A new --maka-transcript-measure: 800px has exactly one runtime consumer: .maka-turn.
  • Composer, header notices, hero, interaction, plan, agent-graph, and the new WorkHub consumer therefore keep their existing 680px behavior; no before/after evidence is needed for surfaces this PR no longer changes.
  • The 800px value follows the Astryx AI Chat conversation message-area value. This does not switch to density="spacious", so Maka keeps its existing balanced padding, dock margin, and mask semantics.

This also makes the existing title accurate again: the delivered layout change is transcript-scoped.

Rendered evidence

At the same 1200×600 CSS-pixel Storybook viewport:

  • before: transcript turn / code card = 680px;
  • after: transcript turn = 800px, Markdown prose heading remains 680px, code card = 800px;
  • the code card now fills the transcript via CodeBlock width="100%" instead of Astryx fit-content with its 400px floor.

The PR description now contains regenerated, same-viewport before/after screenshots for the scoped change.

Verification

  • npm run lint — 2660 files passed
  • npm run format:check — 1605 files passed
  • npm --workspace @maka/desktop run typecheck:stories — passed
  • npm --workspace @maka/desktop run build-storybook — passed
  • npm --workspace @maka/ui test — 226 passed, 0 failed
  • git diff --check — passed

Baseline note: the full workspace build currently fails on latest upstream main at packages/storage/src/__tests__/codex-session-adapter.test.ts:267 because decodeStoredMessage is undefined. Upstream main CI run 32664680331 has the same failure; this PR does not touch that path.

Please re-review this exact head.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving at a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

The [P2] I raised earlier — the transcript measure token — is fixed at this head: --maka-chat-measure is 680px, --maka-transcript-measure is 800px scoped to .maka-turn, and 880 no longer appears anywhere in maka-tokens.css. That thread is resolved.

Gate at this exact head: hosted test is terminal green (all 38 steps, including Desktop e2e, Browser WebContentsView smoke, Alignment audit, Storybook build and smoke, and the CLI candidate build and validation). Zero unresolved review threads. No APPROVED review is bound to an older commit — the one prior approval was dismissed and has not been re-issued.

Approval only; merging is a human's call.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Synced main at 3bb645e99 into this branch in merge commit a8f65f508.

The merge brings in the upstream #3656 storage test fix (decodeStoredMessage -> the canonical decoder); it does not change this PR's five-file UI/Storybook diff. The previous CI failure was exactly that upstream storage compile error.

Fresh verification is green:

  • CI test 32682456425 passed in 16m15s.
  • The run passed build, release contracts, typecheck, affected workspace tests, Runtime Host tests, Desktop E2E, Storybook build/smoke, and installed CLI validation.

The PR is ready for review at exact head a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

@Astro-Han

Copy link
Copy Markdown
Contributor

One comment-wording request and then this is good to go — the code itself is fine.

The new token comment reads as though 800px were an Astryx-mandated value:

Astryx's AI Chat conversation uses an 800px message area…

That is true only at Astryx's spacious density. Maka's chat surface runs at balanced (packages/ui/src/chat-surface-layout.tsx:37, deliberately letting Astryx's own @default 'balanced' stand), and at balanced — as at compact — the message area resolves to max-width: 100%. Astryx hands width to the host at that density rather than prescribing one.

So 800px is Maka's own choice here, not conformance to an upstream rule. That is a perfectly good choice — it matches the reading width Astryx picks for spacious — but the comment should say so, otherwise a future reader will treat the number as untouchable upstream policy.

Suggested rewording, roughly: at balanced density Astryx leaves the message area at max-width: 100% and delegates width to the host; Maka sets its transcript measure to 800px, matching the value Astryx uses at spacious, while prose stays at 680px and code/tables fill the wider container.

Keep the value; just retire the attribution.

中文

只有一处注释措辞需要改,代码本身没问题。

新加的 token 注释写成了"Astryx 的 AI Chat 会话使用 800px 消息区",这句话只在 Astryx 的 spacious 密度下成立。Maka 的聊天面跑在 balanced(见 packages/ui/src/chat-surface-layout.tsx:37,当初就是特意让 Astryx 自己的 @default 'balanced' 生效),而 balanced 与 compact 一样,消息区解析为 max-width: 100%——在这个密度下 Astryx 把宽度交给宿主,并没有规定值。

所以 800px 是 Maka 自己的选择,而不是对上游规范的遵循。这个选择没问题(它正好等于 Astryx 在 spacious 下采用的阅读宽度),但注释应当如实说明,否则后来的人会把这个数字当成不可改动的上游政策。

建议改成大意如下:balanced 密度下 Astryx 将消息区保持在 max-width: 100% 并把宽度交给宿主;Maka 自行将 transcript 宽度定为 800px,与 Astryx 在 spacious 下的取值一致,同时 prose 仍为 680px,代码与表格填满容器。

值保留,去掉冒称上游规定的说法即可。

@Astro-Han

Copy link
Copy Markdown
Contributor

LGTM — merging. Thanks for narrowing this to a transcript-scoped token instead of widening the shared measure, and for writing the 800px provenance into the file.

中文

看过了,合并。感谢改成 transcript 范围的单独 token 而不是加宽共享量度,也感谢把 800px 的来源写进了文件里。

@Astro-Han
Astro-Han merged commit aed0a65 into apache:mainAug 24, 2026
1 check passed
Astro-Han added a commit that referenced this pull request Aug 27, 2026
Adversarial review of the previous two commits, on the simplicity axis only.
The unit contract goes. It asserted Astryx's private `--x-maxWidth` StyleX
output, so an upstream change of internal representation would fail it with no
product signal, and both regressions it covered — the prop dropped, the upstream
default changed — already fail the E2E, measured at 120px. One behaviour, one
test.
Comments lose what the code already says: the token block, the prop comment, and
the spec docblock each keep only the external fact a reader cannot derive, which
is that Astryx caps prose at 680px. The docblock also claimed a turn has one
right edge; `.maka-turn-lineage-row` and `.maka-turn-footer` cap at
`--maka-chat-measure` by design, so that claim would have sent the next reader
to "fix" them.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers. Both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
Wider, not narrower, because narrowing would undo #3617 and put code back in a
column too tight to read. The composer, hero and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero
and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
Which authority holds the measure is the caller's to say, so `contentWidth` is a
`Markdown` / `MarkdownBody` prop. The transcript turn passes `100%` and lets its
column govern. The two other callers — the Daily Review report and the Artifact
Preview — sit in containers that hold no measure of their own, so for them
Astryx's 680px cap IS the measure and they leave the prop alone.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container actually has a measure, and two did not.
Astryx renders a supplied `components.code` bare — no spacing, no width, no
alignment — and Maka always supplies one, so the Daily Review report and the
Artifact Preview were already showing prose at 680 with code blocks running the
full width of an uncapped page: the same two edges, one surface over. Both
containers now hold the measure, which is what the transcript column was doing
all along.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container has one, and the two document callers
did not. Astryx renders a supplied `components.code` bare — no spacing, no
width, no alignment — and Maka always supplies one, so on the Daily Review
report, which sits on an uncapped module page, prose stopped at 680 while the
code blocks inside it ran the width of the window. The report column holds the
measure now, and it is the column and not the prose inside it: a section is a
heading, a divider and its prose, so capping only the prose would have left the
other two running past it. The Artifact Preview pane caps itself at 600px and so
never showed this in the normal layout; it holds the measure for the stacked
layout a narrow window switches to, where the workbar drops that cap.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
The Artifact Preview comment loses a number for the same reason. It had written
the workbar's 600px cap out as a literal, which is a second copy of a value
`SESSION_WORKBAR_MAX_WIDTH` already owns and nothing keeps in sync; it names the
constant instead.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. #3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo #3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs #3617
Generated-by: Claude Code
saltand pushed a commit to saltand/maka-agent that referenced this pull request Aug 31, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. apache#3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo apache#3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs apache#3617
Generated-by: Claude Code
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@liugddx@Astro-Han
, '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('^' + ".*" + ' fix(desktop): widen transcript code blocks by liugddx · Pull Request #3617 · apache/maka · GitHub
Skip to content

fix(desktop): widen transcript code blocks - #3617

Merged
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure
Aug 24, 2026
Merged

fix(desktop): widen transcript code blocks#3617
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure

Conversation

@liugddx

@liugddxliugddx commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Keep the shared desktop --maka-chat-measure at 680px, so composer, header notices, hero, interaction, plan, agent-graph, and WorkHub surfaces do not change width.
  • Add a transcript-only 800px measure, matching the Astryx AI Chat conversation message area without adopting the unrelated spacious padding and mask semantics.
  • Preserve the Astryx Markdown 680px prose measure while allowing code cards to fill the 800px transcript container instead of retaining the 400px fit-content floor.
  • Add a focused transcript code-block Storybook scenario for visual review.

Screenshots

Before — 680px transcript/code card:

Code block at the previous 680px transcript measure

After — 800px transcript/code card, with prose still capped at 680px:

Code block at the scoped 800px transcript measure

Scope check

  • --maka-chat-measure: unchanged at 680px.
  • --maka-transcript-measure: 800px, with one runtime consumer: .maka-turn.
  • Measured in the rendered Storybook DOM: turn 800px; Markdown heading/prose measure 680px; code card 800px.
  • Narrow windows still resolve .maka-turn { width: 100% } against available inline space.

Verification

  • npm run lint — 2660 files, passed.
  • npm run format:check — 1605 files, passed.
  • npm --workspace @maka/desktop run typecheck:stories — passed.
  • npm --workspace @maka/desktop run build-storybook — passed.
  • npm --workspace @maka/ui test — 226 passed, 0 failed.
  • Storybook transcript code-block scenario rendered at 680px and 800px; both screenshots were visually checked at the same 1200×600 CSS-pixel viewport.
  • Full workspace build is currently blocked by the latest upstream main baseline: packages/storage/src/__tests__/codex-session-adapter.test.ts:267 references missing decodeStoredMessage. The same failure occurs in upstream main CI run 32664680331; this PR does not alter that file.

AI use

Select exactly one:

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

Tool(s) and scope: Codex inspected the reviewer feedback and Astryx package behavior, narrowed the global change to a transcript-only measure, updated the implementation and visual evidence, synchronized current main, and ran verification.

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

@liugddxliugddx changed the title fix(desktop): widen the chat reading measurefix(desktop): widen transcript code blocksAug 23, 2026
Astro-Han
Astro-Han previously approved these changes Aug 23, 2026

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed exact head 9fe8ec4. Coverage: the shared 680→880px desktop chat measure across transcript, composer, header, hero, interaction/plan/agent-graph consumers and their responsive caps; Markdown CodeBlock width behavior for single-line and multiline fences; Storybook scenario and supplied before/after evidence. Exclusions: live Electron interaction at multiple OS scaling factors and exhaustive visual review of every shared-measure consumer. Local UI→Desktop builds passed and the full UI suite is 217/217 green; hosted exact-head test is green. No P0–P3 findings. The branch is 24 commits behind current main; a current-main merge-tree probe is clean.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up on the already-published approval, raised by a maintainer after it went out. Not a defect claim and not a retraction of the approval — a request for evidence proportional to the change surface.

The diff is small, but this line is not transcript-scoped. --maka-chat-measure lives on :root and is consumed by the transcript, composer, header, onboarding hero, and the interaction / plan / agent-graph surfaces. Moving it 680px -> 880px is a global layout change delivered through a five-file diff, so fix(desktop): widen transcript code blocks understates what lands.

The existing review verified that every consumer caps itself at the available inline size and that no surface overflows, and it explicitly excluded exhaustive visual regression across those consumers and real multi-scale-factor Electron interaction. That exclusion is exactly where a 200px widening carries its risk: the logical claim has evidence, the appearance claim does not.

Two things would close it:

  1. Before/after screenshots for the other --maka-chat-measure consumers, not only the transcript code block — composer, header, hero, and the interaction / plan / agent-graph surfaces. The two screenshots in this PR cover the motivating case only.
  2. Either retitle to reflect a global measure change, or split the :root token change into its own PR so the transcript fix can land on its own evidence.

Separately, we are checking what width the upstream Astryx template recommends for an AI chat surface. If the official guidance names a value, this token should agree with it rather than being chosen independently; we will post that finding here when we have it.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up with the upstream comparison promised in the previous comment. The 880px value has no Astryx basis, and the closest official AI-chat figure is 800px. I verified this against the vendored package rather than taking it second-hand.

  • @astryxdesign/cli/assets/templates/pages/ai-chat/page.tsx — the official "AI Chat Conversation" page renders <ChatLayout density="spacious">.
  • @astryxdesign/core/src/Chat/ChatLayout.tsx — for that density, both messageAreaSpacious and dockInnerSpacious are capped at maxWidth: 800. That single value bounds the transcript and the composer, which makes it the closest upstream analogue to this repo's shared --maka-chat-measure.

Two nearby values are not an AI-chat recommendation and should not be cited as one:

  • Markdown.tsx defaults contentWidth to 680px, but its own documentation scopes that to paragraphs, headings, lists and blockquotes; tables and code blocks are explicitly allowed to fill the container. So 680 is a prose measure, not a transcript/composer width — and notably, upstream's answer to "code fences look cramped" is that code is already exempt from the prose measure, not that the prose measure should grow.
  • pages/ai-chat-landing/page.tsx uses contentWidth={720}, but that is the landing/greeting surface, not a conversation transcript.

The theme-neutral package ships no chat or prose width token, and neither this repo's Astryx alignment audits nor the vendored patch mention 880 or anything equivalent.

So the accurate statement is: upstream picked 800 for a conversation surface, 680 for prose, and 880 is this project's own product judgement. That is a legitimate thing to decide — but it has to be carried by product evidence, not by an implied upstream endorsement, and the evidence should cover every --maka-chat-measure consumer rather than the code-block case alone.

On process: the earlier approval on this PR was published before this comparison existed, and the reviewer who issued it has since said it was too strong to stand as merge evidence. This repository does not dismiss reviews, so that approval cannot be withdrawn mechanically — please treat this comment as superseding it. Nothing here is a defect claim about the code; it is a request that the change surface and the evidence match before this lands.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

补一条来自 Astryx 官方值的建议(承接前面关于「官方模板宽度是多少」的问题)。

查了 vendored 的 @astryxdesign/core/src/Chat/ChatLayout.tsx:官方 AI Chat Conversation 这一档的宽度是 800pxmessageAreaSpacious { maxWidth: 800 } / dockInnerSpacious { maxWidth: 800 }),而当前仓库用的 balanced 档两者都是 maxWidth: '100%'(不设上限)。所以 880 不是官方值,800 才是。

另外有人提过「直接切 <ChatLayout density=\"spacious\">」这条路,我核过之后认为它单独不成立,两个原因:

  1. spacious 不是一个纯宽度旋钮:它同时把消息区 paddingInline 0 → --spacing-4、dock 边距 --spacing-3--spacing-4、顶部渐隐 100px → 120px、mask ramp 36px → 48px。是一整档间距语义。
  2. 覆盖面不够:ChatLayout 只拥有转录区和输入坞内层两处。--maka-chat-measure 的其余消费点(composer.csshero.cssinteraction-prompts.cssplan-mode.csschat-header.cssagent-graph.csspackages/ui/src/styles.css)都是纯 CSS,不经过 ChatLayout,切 density 之后它们仍停在旧值,界面上会出现两套并存的量度。

这不改变之前那条请求(需要补齐所有消费面的前后对比);只是把「取哪个数」这一项收敛掉了。

Comment threadapps/desktop/src/renderer/maka-tokens.css Outdated
@Astro-Han
Astro-Han dismissed their stale reviewAugust 23, 2026 18:24

Withdrawing this approval. It was submitted before the review of this PR was complete, and the same reviewer retracted it in a follow-up comment shortly afterwards. Two blocking concerns remain open on this exact head: the before/after evidence across every --maka-chat-measure consumer has not been supplied, and the chosen 880px has no upstream basis (Astryx's official AI Chat Conversation width is 800px). Leaving a green approval attached to this head would misrepresent the review state.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Addressed the follow-up at exact head 0000bc544fa9949740a73ae4cf3f464d6e8c2acd.

Scope decision

I took the scope-reduction option rather than widening the shared token:

  • --maka-chat-measure is restored to and remains at 680px.
  • A new --maka-transcript-measure: 800px has exactly one runtime consumer: .maka-turn.
  • Composer, header notices, hero, interaction, plan, agent-graph, and the new WorkHub consumer therefore keep their existing 680px behavior; no before/after evidence is needed for surfaces this PR no longer changes.
  • The 800px value follows the Astryx AI Chat conversation message-area value. This does not switch to density="spacious", so Maka keeps its existing balanced padding, dock margin, and mask semantics.

This also makes the existing title accurate again: the delivered layout change is transcript-scoped.

Rendered evidence

At the same 1200×600 CSS-pixel Storybook viewport:

  • before: transcript turn / code card = 680px;
  • after: transcript turn = 800px, Markdown prose heading remains 680px, code card = 800px;
  • the code card now fills the transcript via CodeBlock width="100%" instead of Astryx fit-content with its 400px floor.

The PR description now contains regenerated, same-viewport before/after screenshots for the scoped change.

Verification

  • npm run lint — 2660 files passed
  • npm run format:check — 1605 files passed
  • npm --workspace @maka/desktop run typecheck:stories — passed
  • npm --workspace @maka/desktop run build-storybook — passed
  • npm --workspace @maka/ui test — 226 passed, 0 failed
  • git diff --check — passed

Baseline note: the full workspace build currently fails on latest upstream main at packages/storage/src/__tests__/codex-session-adapter.test.ts:267 because decodeStoredMessage is undefined. Upstream main CI run 32664680331 has the same failure; this PR does not touch that path.

Please re-review this exact head.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving at a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

The [P2] I raised earlier — the transcript measure token — is fixed at this head: --maka-chat-measure is 680px, --maka-transcript-measure is 800px scoped to .maka-turn, and 880 no longer appears anywhere in maka-tokens.css. That thread is resolved.

Gate at this exact head: hosted test is terminal green (all 38 steps, including Desktop e2e, Browser WebContentsView smoke, Alignment audit, Storybook build and smoke, and the CLI candidate build and validation). Zero unresolved review threads. No APPROVED review is bound to an older commit — the one prior approval was dismissed and has not been re-issued.

Approval only; merging is a human's call.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Synced main at 3bb645e99 into this branch in merge commit a8f65f508.

The merge brings in the upstream #3656 storage test fix (decodeStoredMessage -> the canonical decoder); it does not change this PR's five-file UI/Storybook diff. The previous CI failure was exactly that upstream storage compile error.

Fresh verification is green:

  • CI test 32682456425 passed in 16m15s.
  • The run passed build, release contracts, typecheck, affected workspace tests, Runtime Host tests, Desktop E2E, Storybook build/smoke, and installed CLI validation.

The PR is ready for review at exact head a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

@Astro-Han

Copy link
Copy Markdown
Contributor

One comment-wording request and then this is good to go — the code itself is fine.

The new token comment reads as though 800px were an Astryx-mandated value:

Astryx's AI Chat conversation uses an 800px message area…

That is true only at Astryx's spacious density. Maka's chat surface runs at balanced (packages/ui/src/chat-surface-layout.tsx:37, deliberately letting Astryx's own @default 'balanced' stand), and at balanced — as at compact — the message area resolves to max-width: 100%. Astryx hands width to the host at that density rather than prescribing one.

So 800px is Maka's own choice here, not conformance to an upstream rule. That is a perfectly good choice — it matches the reading width Astryx picks for spacious — but the comment should say so, otherwise a future reader will treat the number as untouchable upstream policy.

Suggested rewording, roughly: at balanced density Astryx leaves the message area at max-width: 100% and delegates width to the host; Maka sets its transcript measure to 800px, matching the value Astryx uses at spacious, while prose stays at 680px and code/tables fill the wider container.

Keep the value; just retire the attribution.

中文

只有一处注释措辞需要改,代码本身没问题。

新加的 token 注释写成了"Astryx 的 AI Chat 会话使用 800px 消息区",这句话只在 Astryx 的 spacious 密度下成立。Maka 的聊天面跑在 balanced(见 packages/ui/src/chat-surface-layout.tsx:37,当初就是特意让 Astryx 自己的 @default 'balanced' 生效),而 balanced 与 compact 一样,消息区解析为 max-width: 100%——在这个密度下 Astryx 把宽度交给宿主,并没有规定值。

所以 800px 是 Maka 自己的选择,而不是对上游规范的遵循。这个选择没问题(它正好等于 Astryx 在 spacious 下采用的阅读宽度),但注释应当如实说明,否则后来的人会把这个数字当成不可改动的上游政策。

建议改成大意如下:balanced 密度下 Astryx 将消息区保持在 max-width: 100% 并把宽度交给宿主;Maka 自行将 transcript 宽度定为 800px,与 Astryx 在 spacious 下的取值一致,同时 prose 仍为 680px,代码与表格填满容器。

值保留,去掉冒称上游规定的说法即可。

@Astro-Han

Copy link
Copy Markdown
Contributor

LGTM — merging. Thanks for narrowing this to a transcript-scoped token instead of widening the shared measure, and for writing the 800px provenance into the file.

中文

看过了,合并。感谢改成 transcript 范围的单独 token 而不是加宽共享量度,也感谢把 800px 的来源写进了文件里。

@Astro-Han
Astro-Han merged commit aed0a65 into apache:mainAug 24, 2026
1 check passed
Astro-Han added a commit that referenced this pull request Aug 27, 2026
Adversarial review of the previous two commits, on the simplicity axis only.
The unit contract goes. It asserted Astryx's private `--x-maxWidth` StyleX
output, so an upstream change of internal representation would fail it with no
product signal, and both regressions it covered — the prop dropped, the upstream
default changed — already fail the E2E, measured at 120px. One behaviour, one
test.
Comments lose what the code already says: the token block, the prop comment, and
the spec docblock each keep only the external fact a reader cannot derive, which
is that Astryx caps prose at 680px. The docblock also claimed a turn has one
right edge; `.maka-turn-lineage-row` and `.maka-turn-footer` cap at
`--maka-chat-measure` by design, so that claim would have sent the next reader
to "fix" them.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers. Both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
Wider, not narrower, because narrowing would undo #3617 and put code back in a
column too tight to read. The composer, hero and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero
and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
Which authority holds the measure is the caller's to say, so `contentWidth` is a
`Markdown` / `MarkdownBody` prop. The transcript turn passes `100%` and lets its
column govern. The two other callers — the Daily Review report and the Artifact
Preview — sit in containers that hold no measure of their own, so for them
Astryx's 680px cap IS the measure and they leave the prop alone.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container actually has a measure, and two did not.
Astryx renders a supplied `components.code` bare — no spacing, no width, no
alignment — and Maka always supplies one, so the Daily Review report and the
Artifact Preview were already showing prose at 680 with code blocks running the
full width of an uncapped page: the same two edges, one surface over. Both
containers now hold the measure, which is what the transcript column was doing
all along.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container has one, and the two document callers
did not. Astryx renders a supplied `components.code` bare — no spacing, no
width, no alignment — and Maka always supplies one, so on the Daily Review
report, which sits on an uncapped module page, prose stopped at 680 while the
code blocks inside it ran the width of the window. The report column holds the
measure now, and it is the column and not the prose inside it: a section is a
heading, a divider and its prose, so capping only the prose would have left the
other two running past it. The Artifact Preview pane caps itself at 600px and so
never showed this in the normal layout; it holds the measure for the stacked
layout a narrow window switches to, where the workbar drops that cap.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
The Artifact Preview comment loses a number for the same reason. It had written
the workbar's 600px cap out as a literal, which is a second copy of a value
`SESSION_WORKBAR_MAX_WIDTH` already owns and nothing keeps in sync; it names the
constant instead.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. #3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo #3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs #3617
Generated-by: Claude Code
saltand pushed a commit to saltand/maka-agent that referenced this pull request Aug 31, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. apache#3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo apache#3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs apache#3617
Generated-by: Claude Code
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@liugddx@Astro-Han
, '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(desktop): widen transcript code blocks by liugddx · Pull Request #3617 · apache/maka · GitHub
Skip to content

fix(desktop): widen transcript code blocks - #3617

Merged
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure
Aug 24, 2026
Merged

fix(desktop): widen transcript code blocks#3617
Astro-Han merged 5 commits into
apache:mainfrom
liugddx:fix/widen-chat-measure

Conversation

@liugddx

@liugddxliugddx commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Keep the shared desktop --maka-chat-measure at 680px, so composer, header notices, hero, interaction, plan, agent-graph, and WorkHub surfaces do not change width.
  • Add a transcript-only 800px measure, matching the Astryx AI Chat conversation message area without adopting the unrelated spacious padding and mask semantics.
  • Preserve the Astryx Markdown 680px prose measure while allowing code cards to fill the 800px transcript container instead of retaining the 400px fit-content floor.
  • Add a focused transcript code-block Storybook scenario for visual review.

Screenshots

Before — 680px transcript/code card:

Code block at the previous 680px transcript measure

After — 800px transcript/code card, with prose still capped at 680px:

Code block at the scoped 800px transcript measure

Scope check

  • --maka-chat-measure: unchanged at 680px.
  • --maka-transcript-measure: 800px, with one runtime consumer: .maka-turn.
  • Measured in the rendered Storybook DOM: turn 800px; Markdown heading/prose measure 680px; code card 800px.
  • Narrow windows still resolve .maka-turn { width: 100% } against available inline space.

Verification

  • npm run lint — 2660 files, passed.
  • npm run format:check — 1605 files, passed.
  • npm --workspace @maka/desktop run typecheck:stories — passed.
  • npm --workspace @maka/desktop run build-storybook — passed.
  • npm --workspace @maka/ui test — 226 passed, 0 failed.
  • Storybook transcript code-block scenario rendered at 680px and 800px; both screenshots were visually checked at the same 1200×600 CSS-pixel viewport.
  • Full workspace build is currently blocked by the latest upstream main baseline: packages/storage/src/__tests__/codex-session-adapter.test.ts:267 references missing decodeStoredMessage. The same failure occurs in upstream main CI run 32664680331; this PR does not alter that file.

AI use

Select exactly one:

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

Tool(s) and scope: Codex inspected the reviewer feedback and Astryx package behavior, narrowed the global change to a transcript-only measure, updated the implementation and visual evidence, synchronized current main, and ran verification.

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

@liugddxliugddx changed the title fix(desktop): widen the chat reading measurefix(desktop): widen transcript code blocksAug 23, 2026
Astro-Han
Astro-Han previously approved these changes Aug 23, 2026

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed exact head 9fe8ec4. Coverage: the shared 680→880px desktop chat measure across transcript, composer, header, hero, interaction/plan/agent-graph consumers and their responsive caps; Markdown CodeBlock width behavior for single-line and multiline fences; Storybook scenario and supplied before/after evidence. Exclusions: live Electron interaction at multiple OS scaling factors and exhaustive visual review of every shared-measure consumer. Local UI→Desktop builds passed and the full UI suite is 217/217 green; hosted exact-head test is green. No P0–P3 findings. The branch is 24 commits behind current main; a current-main merge-tree probe is clean.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up on the already-published approval, raised by a maintainer after it went out. Not a defect claim and not a retraction of the approval — a request for evidence proportional to the change surface.

The diff is small, but this line is not transcript-scoped. --maka-chat-measure lives on :root and is consumed by the transcript, composer, header, onboarding hero, and the interaction / plan / agent-graph surfaces. Moving it 680px -> 880px is a global layout change delivered through a five-file diff, so fix(desktop): widen transcript code blocks understates what lands.

The existing review verified that every consumer caps itself at the available inline size and that no surface overflows, and it explicitly excluded exhaustive visual regression across those consumers and real multi-scale-factor Electron interaction. That exclusion is exactly where a 200px widening carries its risk: the logical claim has evidence, the appearance claim does not.

Two things would close it:

  1. Before/after screenshots for the other --maka-chat-measure consumers, not only the transcript code block — composer, header, hero, and the interaction / plan / agent-graph surfaces. The two screenshots in this PR cover the motivating case only.
  2. Either retitle to reflect a global measure change, or split the :root token change into its own PR so the transcript fix can land on its own evidence.

Separately, we are checking what width the upstream Astryx template recommends for an AI chat surface. If the official guidance names a value, this token should agree with it rather than being chosen independently; we will post that finding here when we have it.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Follow-up with the upstream comparison promised in the previous comment. The 880px value has no Astryx basis, and the closest official AI-chat figure is 800px. I verified this against the vendored package rather than taking it second-hand.

  • @astryxdesign/cli/assets/templates/pages/ai-chat/page.tsx — the official "AI Chat Conversation" page renders <ChatLayout density="spacious">.
  • @astryxdesign/core/src/Chat/ChatLayout.tsx — for that density, both messageAreaSpacious and dockInnerSpacious are capped at maxWidth: 800. That single value bounds the transcript and the composer, which makes it the closest upstream analogue to this repo's shared --maka-chat-measure.

Two nearby values are not an AI-chat recommendation and should not be cited as one:

  • Markdown.tsx defaults contentWidth to 680px, but its own documentation scopes that to paragraphs, headings, lists and blockquotes; tables and code blocks are explicitly allowed to fill the container. So 680 is a prose measure, not a transcript/composer width — and notably, upstream's answer to "code fences look cramped" is that code is already exempt from the prose measure, not that the prose measure should grow.
  • pages/ai-chat-landing/page.tsx uses contentWidth={720}, but that is the landing/greeting surface, not a conversation transcript.

The theme-neutral package ships no chat or prose width token, and neither this repo's Astryx alignment audits nor the vendored patch mention 880 or anything equivalent.

So the accurate statement is: upstream picked 800 for a conversation surface, 680 for prose, and 880 is this project's own product judgement. That is a legitimate thing to decide — but it has to be carried by product evidence, not by an implied upstream endorsement, and the evidence should cover every --maka-chat-measure consumer rather than the code-block case alone.

On process: the earlier approval on this PR was published before this comparison existed, and the reviewer who issued it has since said it was too strong to stand as merge evidence. This repository does not dismiss reviews, so that approval cannot be withdrawn mechanically — please treat this comment as superseding it. Nothing here is a defect claim about the code; it is a request that the change surface and the evidence match before this lands.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

补一条来自 Astryx 官方值的建议(承接前面关于「官方模板宽度是多少」的问题)。

查了 vendored 的 @astryxdesign/core/src/Chat/ChatLayout.tsx:官方 AI Chat Conversation 这一档的宽度是 800pxmessageAreaSpacious { maxWidth: 800 } / dockInnerSpacious { maxWidth: 800 }),而当前仓库用的 balanced 档两者都是 maxWidth: '100%'(不设上限)。所以 880 不是官方值,800 才是。

另外有人提过「直接切 <ChatLayout density=\"spacious\">」这条路,我核过之后认为它单独不成立,两个原因:

  1. spacious 不是一个纯宽度旋钮:它同时把消息区 paddingInline 0 → --spacing-4、dock 边距 --spacing-3--spacing-4、顶部渐隐 100px → 120px、mask ramp 36px → 48px。是一整档间距语义。
  2. 覆盖面不够:ChatLayout 只拥有转录区和输入坞内层两处。--maka-chat-measure 的其余消费点(composer.csshero.cssinteraction-prompts.cssplan-mode.csschat-header.cssagent-graph.csspackages/ui/src/styles.css)都是纯 CSS,不经过 ChatLayout,切 density 之后它们仍停在旧值,界面上会出现两套并存的量度。

这不改变之前那条请求(需要补齐所有消费面的前后对比);只是把「取哪个数」这一项收敛掉了。

Comment threadapps/desktop/src/renderer/maka-tokens.css Outdated
@Astro-Han
Astro-Han dismissed their stale reviewAugust 23, 2026 18:24

Withdrawing this approval. It was submitted before the review of this PR was complete, and the same reviewer retracted it in a follow-up comment shortly afterwards. Two blocking concerns remain open on this exact head: the before/after evidence across every --maka-chat-measure consumer has not been supplied, and the chosen 880px has no upstream basis (Astryx's official AI Chat Conversation width is 800px). Leaving a green approval attached to this head would misrepresent the review state.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Addressed the follow-up at exact head 0000bc544fa9949740a73ae4cf3f464d6e8c2acd.

Scope decision

I took the scope-reduction option rather than widening the shared token:

  • --maka-chat-measure is restored to and remains at 680px.
  • A new --maka-transcript-measure: 800px has exactly one runtime consumer: .maka-turn.
  • Composer, header notices, hero, interaction, plan, agent-graph, and the new WorkHub consumer therefore keep their existing 680px behavior; no before/after evidence is needed for surfaces this PR no longer changes.
  • The 800px value follows the Astryx AI Chat conversation message-area value. This does not switch to density="spacious", so Maka keeps its existing balanced padding, dock margin, and mask semantics.

This also makes the existing title accurate again: the delivered layout change is transcript-scoped.

Rendered evidence

At the same 1200×600 CSS-pixel Storybook viewport:

  • before: transcript turn / code card = 680px;
  • after: transcript turn = 800px, Markdown prose heading remains 680px, code card = 800px;
  • the code card now fills the transcript via CodeBlock width="100%" instead of Astryx fit-content with its 400px floor.

The PR description now contains regenerated, same-viewport before/after screenshots for the scoped change.

Verification

  • npm run lint — 2660 files passed
  • npm run format:check — 1605 files passed
  • npm --workspace @maka/desktop run typecheck:stories — passed
  • npm --workspace @maka/desktop run build-storybook — passed
  • npm --workspace @maka/ui test — 226 passed, 0 failed
  • git diff --check — passed

Baseline note: the full workspace build currently fails on latest upstream main at packages/storage/src/__tests__/codex-session-adapter.test.ts:267 because decodeStoredMessage is undefined. Upstream main CI run 32664680331 has the same failure; this PR does not touch that path.

Please re-review this exact head.

@Astro-HanAstro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving at a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

The [P2] I raised earlier — the transcript measure token — is fixed at this head: --maka-chat-measure is 680px, --maka-transcript-measure is 800px scoped to .maka-turn, and 880 no longer appears anywhere in maka-tokens.css. That thread is resolved.

Gate at this exact head: hosted test is terminal green (all 38 steps, including Desktop e2e, Browser WebContentsView smoke, Alignment audit, Storybook build and smoke, and the CLI candidate build and validation). Zero unresolved review threads. No APPROVED review is bound to an older commit — the one prior approval was dismissed and has not been re-issued.

Approval only; merging is a human's call.

@liugddx

Copy link
Copy Markdown
MemberAuthor

Synced main at 3bb645e99 into this branch in merge commit a8f65f508.

The merge brings in the upstream #3656 storage test fix (decodeStoredMessage -> the canonical decoder); it does not change this PR's five-file UI/Storybook diff. The previous CI failure was exactly that upstream storage compile error.

Fresh verification is green:

  • CI test 32682456425 passed in 16m15s.
  • The run passed build, release contracts, typecheck, affected workspace tests, Runtime Host tests, Desktop E2E, Storybook build/smoke, and installed CLI validation.

The PR is ready for review at exact head a8f65f508ab2a284a9bac8f4cc93398b20acc67c.

@Astro-Han

Copy link
Copy Markdown
Contributor

One comment-wording request and then this is good to go — the code itself is fine.

The new token comment reads as though 800px were an Astryx-mandated value:

Astryx's AI Chat conversation uses an 800px message area…

That is true only at Astryx's spacious density. Maka's chat surface runs at balanced (packages/ui/src/chat-surface-layout.tsx:37, deliberately letting Astryx's own @default 'balanced' stand), and at balanced — as at compact — the message area resolves to max-width: 100%. Astryx hands width to the host at that density rather than prescribing one.

So 800px is Maka's own choice here, not conformance to an upstream rule. That is a perfectly good choice — it matches the reading width Astryx picks for spacious — but the comment should say so, otherwise a future reader will treat the number as untouchable upstream policy.

Suggested rewording, roughly: at balanced density Astryx leaves the message area at max-width: 100% and delegates width to the host; Maka sets its transcript measure to 800px, matching the value Astryx uses at spacious, while prose stays at 680px and code/tables fill the wider container.

Keep the value; just retire the attribution.

中文

只有一处注释措辞需要改,代码本身没问题。

新加的 token 注释写成了"Astryx 的 AI Chat 会话使用 800px 消息区",这句话只在 Astryx 的 spacious 密度下成立。Maka 的聊天面跑在 balanced(见 packages/ui/src/chat-surface-layout.tsx:37,当初就是特意让 Astryx 自己的 @default 'balanced' 生效),而 balanced 与 compact 一样,消息区解析为 max-width: 100%——在这个密度下 Astryx 把宽度交给宿主,并没有规定值。

所以 800px 是 Maka 自己的选择,而不是对上游规范的遵循。这个选择没问题(它正好等于 Astryx 在 spacious 下采用的阅读宽度),但注释应当如实说明,否则后来的人会把这个数字当成不可改动的上游政策。

建议改成大意如下:balanced 密度下 Astryx 将消息区保持在 max-width: 100% 并把宽度交给宿主;Maka 自行将 transcript 宽度定为 800px,与 Astryx 在 spacious 下的取值一致,同时 prose 仍为 680px,代码与表格填满容器。

值保留,去掉冒称上游规定的说法即可。

@Astro-Han

Copy link
Copy Markdown
Contributor

LGTM — merging. Thanks for narrowing this to a transcript-scoped token instead of widening the shared measure, and for writing the 800px provenance into the file.

中文

看过了,合并。感谢改成 transcript 范围的单独 token 而不是加宽共享量度,也感谢把 800px 的来源写进了文件里。

@Astro-Han
Astro-Han merged commit aed0a65 into apache:mainAug 24, 2026
1 check passed
Astro-Han added a commit that referenced this pull request Aug 27, 2026
Adversarial review of the previous two commits, on the simplicity axis only.
The unit contract goes. It asserted Astryx's private `--x-maxWidth` StyleX
output, so an upstream change of internal representation would fail it with no
product signal, and both regressions it covered — the prop dropped, the upstream
default changed — already fail the E2E, measured at 120px. One behaviour, one
test.
Comments lose what the code already says: the token block, the prop comment, and
the spec docblock each keep only the external fact a reader cannot derive, which
is that Astryx caps prose at 680px. The docblock also claimed a turn has one
right edge; `.maka-turn-lineage-row` and `.maka-turn-footer` cap at
`--maka-chat-measure` by design, so that claim would have sent the next reader
to "fix" them.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers. Both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` quietly owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
Wider, not narrower, because narrowing would undo #3617 and put code back in a
column too tight to read. The composer, hero and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, so the container it lands in is
the only authority. Every caller already clamps itself.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero
and notices gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px with
`contentAlign: 'start'`, while code and tables are left to fill the container.
#3617 raised the column from 680 to 800 so source evidence could be read, which
made the second authority visible for the first time.
Which authority holds the measure is the caller's to say, so `contentWidth` is a
`Markdown` / `MarkdownBody` prop. The transcript turn passes `100%` and lets its
column govern. The two other callers — the Daily Review report and the Artifact
Preview — sit in containers that hold no measure of their own, so for them
Astryx's 680px cap IS the measure and they leave the prop alone.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container actually has a measure, and two did not.
Astryx renders a supplied `components.code` bare — no spacing, no width, no
alignment — and Maka always supplies one, so the Daily Review report and the
Artifact Preview were already showing prose at 680 with code blocks running the
full width of an uncapped page: the same two edges, one surface over. Both
containers now hold the measure, which is what the transcript column was doing
all along.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
The turn column is `--maka-transcript-measure` (800px), and the tool cards,
code blocks and the user bubble all reach it — but every paragraph stopped 120px
short, leaving a band of whitespace down the right side of the transcript that
grows with the window.
The cause is two reading-measure authorities. Maka's column owns one, and
Astryx's `Markdown` owns another: `contentWidth` defaults to 680px. #3617 raised
the column from 680 to 800 so source evidence could be read, which made the
second authority visible for the first time.
`MarkdownBody` now passes `contentWidth: 100%`, which is a disclaimer rather
than a width: Markdown holds no measure, and the container it lands in is the
only one that does.
That rule only works if every container has one, and the two document callers
did not. Astryx renders a supplied `components.code` bare — no spacing, no
width, no alignment — and Maka always supplies one, so on the Daily Review
report, which sits on an uncapped module page, prose stopped at 680 while the
code blocks inside it ran the width of the window. The report column holds the
measure now, and it is the column and not the prose inside it: a section is a
heading, a divider and its prose, so capping only the prose would have left the
other two running past it. The Artifact Preview pane caps itself at 600px and so
never showed this in the normal layout; it holds the measure for the stacked
layout a narrow window switches to, where the workbar drops that cap.
Also corrects the neighbouring `--maka-chat-measure` comment, which still named
the conversation and tool output as its consumers; both moved to the transcript
measure in #3617.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two. #3617 introduced the second so transcript code, tables and tool
output could be read, and every surface the user answers with — composer, header
notices, hero, plan mode, WorkHub — stayed at the narrower one. The answer was
therefore wider than the box you type into, and turn chrome (`.maka-turn-footer`,
`.maka-turn-lineage-row`) stopped at 680 inside an 800px turn: three right edges
down one conversation.
`--maka-chat-measure` is now 800px and is the only measure. The transcript token
is deleted, `.maka-turn` reads the shared one, and `@maka/ui`'s fallback follows
it — that package does not load `maka-tokens.css`, so its fallback is the value
that actually renders there.
`.workhub-return` had written the old 680 as a literal, so unifying the tokens
alone would have left it 120px narrower than the WorkHub panels above it. It
reads the measure now, like its siblings.
800px because the alternative undoes #3617: at 680 the code, tables and tool
output it widened go back into a column too tight to read. The composer, hero,
notices, plan mode, WorkHub and the agent graph gain 120px.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
`--maka-chat-measure` stopped being about chat two commits ago: it now governs
the Daily Review report and the Artifact Preview as well, and its own comment
calls it "one reading column, and the only one". A name that describes a subset
of what a token governs is how the next surface concludes the token is not for
it and writes a second one — the defect this branch exists to remove, one
release later. It is `--maka-reading-measure` now, at all twenty-four call
sites, and the two comments that said "the chat measure" in prose say the same
thing the token does.
The Artifact Preview comment loses a number for the same reason. It had written
the workbar's 600px cap out as a literal, which is a second copy of a value
`SESSION_WORKBAR_MAX_WIDTH` already owns and nothing keeps in sync; it names the
constant instead.
DESIGN.md gains the rule, in §7 because line length is a typographic decision
and §7 is where the other two named typography rules live: one reading column,
one token, held by the container and never by a component. §11's list of rulers
nobody may duplicate gains "reading measure" beside spacing, radius, icons and
the text axis, which is the sentence that would have stopped #3617 from adding
the second one.
Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 27, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. #3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo #3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs #3617
Generated-by: Claude Code
saltand pushed a commit to saltand/maka-agent that referenced this pull request Aug 31, 2026
An assistant turn had two right edges. The turn column was 800px and the tool
cards, code blocks and user bubble all reached it, but every paragraph stopped
120px short: Astryx's `Markdown` carries its own `contentWidth`, defaulting to
680px, so Maka's column and the component each held a measure. apache#3617 raised the
column from 680 to 800 so source evidence could be read, which made the second
authority visible.
`MarkdownBody` passes `contentWidth: 100%` — a disclaimer rather than a width.
Markdown holds no measure; the container it lands in does. Two containers did
not have one: Astryx renders a supplied `components.code` bare, and Maka always
supplies one, so the Daily Review report showed prose at 680 with code blocks
running the width of an uncapped module page. The report column and the Artifact
Preview hold the measure now.
The branch then takes the same defect to its root:
- `--maka-chat-measure` (680px) and `--maka-transcript-measure` (800px) split one
column in two, so the answer was wider than the box you type into and turn
chrome stopped at 680 inside an 800px turn. One measure now, at 800px, because
680 would undo apache#3617. The composer, header notices, hero, plan mode, WorkHub,
the agent graph and both document surfaces gain 120px.
- Twenty-one custom properties with no `var()` consumer anywhere are removed.
`--elevation-*` and `--foreground-8` stay, with the reasons recorded.
- What the merge made redundant goes with it: the assistant bubble's duplicated
width CSS (Astryx's `width` prop does it), the now-unreachable turn-chrome cap,
a documentation block with no rules under it, and three comments stating the
old split as current.
- The token is `--maka-reading-measure`, since it stopped being about chat, and
DESIGN.md §7 gains The One Measure Rule so the next surface reads the policy
instead of inferring it from a name.
Reported upstream as facebook/astryx#5598: Astryx already publishes an
inheritable `--layout-content-width` in `Layout`, and neither `Markdown` nor
`ChatLayout` participates.
Refs apache#3617
Generated-by: Claude Code
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@liugddx@Astro-Han