English
Part of #5793. A0 (#5794) is available through merged PR #5847. Scope reviewed against upstream main 7c90bac2d on 2026-10-04; numeric counts below are from the original audit.
Problem
The chat surface builds most of its layout from raw elements, product classes, and CSS rules instead of Astryx layout components and props. The official ai-chat template has 0 raw layout elements and 2 className props in 763 lines. In the chat surface, chat-turn.tsx has 48 lines with className, composer.tsx has 47, and tool-activity.tsx has 26. Renderer CSS carries 356 display: flex/grid declarations.
Each hand-written layout needs its own CSS rule and its own spacing decision. That is where most of the CSS volume and the maintenance cost come from. It is also why small spacing inconsistencies keep appearing.
Desired outcome
Chat surface layout is expressed with Astryx VStack, HStack, and component props such as gap, align, and width. The CSS rules that only existed to lay out those elements are deleted. The rendered pixels stay the same, except for listed and accepted differences.
A fully lossless change is not always possible. Astryx SpacingStep accepts 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 and has no 2.5 step (10px). Renderer CSS uses --space-2-5 19 times and has 18 off-grid pixel literals in padding and gap. Where a value has no Astryx step, the PR either keeps a local rule with a /* local: ... */ comment or snaps to the nearest step and lists the difference.
Scope
One PR per surface, in this order:
Remaining work uses the current Composer structure from #5927 and #5954. Preserve Stop/Resume/Send behavior, delivery recovery, owner boundaries and plugin slots. Audit frame wrappers individually: virtualizer, positioning and scroll behavior are product responsibilities. Coordinate frame edits with #5942 and #5615.
Out of scope: the process region (ProcessingBlock, tool-activity.tsx) and failure notices. #5796 and #5797 redesign them.
Acceptance criteria
中文
属于 #5793。A0(#5794)已由 PR #5847 合并交付。2026-10-04 已按 upstream main 7c90bac2d 核对范围;下方数字来自原始审计。
问题
对话界面的大部分布局由原生元素、产品 class 和 CSS 规则搭成,而不是由 Astryx 布局组件和属性完成。官方 ai-chat 模板 763 行里没有原生布局元素,只有 2 个 className。对话界面中,chat-turn.tsx 有 48 行带 className,composer.tsx 有 47 行,tool-activity.tsx 有 26 行。渲染层 CSS 里有 356 条 display: flex/grid 声明。
每一处手写布局都需要自己的 CSS 规则和自己的间距决定。CSS 的体量和维护成本主要来自这里,细小的间距不一致反复出现也是因为这个。
期望结果
对话界面的布局用 Astryx 的 VStack、HStack 和组件属性(如 gap、align、width)表达。只为这些元素布局而存在的 CSS 规则被删除。渲染出的像素保持不变,列出并接受的差异除外。
完全无损并不总能做到。Astryx 的 SpacingStep 只接受 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10,没有 2.5 档(10px)。渲染层 CSS 使用了 19 次 --space-2-5,内边距和间距里还有 18 个不在网格上的像素字面量。遇到没有对应 Astryx 档位的值时,PR 要么保留一条带 /* local: ... */ 注释的局部规则,要么吸附到最近的档位并列出差异。
范围
每个区域一个 PR,按以下顺序:
剩余工作使用 #5927 和 #5954 后的当前输入框结构。保留停止/恢复/发送行为、发送恢复、负责模块的边界和插件槽。逐个审计外框包裹元素:虚拟列表、定位和滚动行为属于产品职责。外框修改与 #5942、#5615 协调。
不在范围内:过程区(ProcessingBlock、tool-activity.tsx)和失败提示。它们由 #5796 和 #5797 重新设计。
验收标准
English
Part of #5793. A0 (#5794) is available through merged PR #5847. Scope reviewed against upstream main
7c90bac2don 2026-10-04; numeric counts below are from the original audit.Problem
The chat surface builds most of its layout from raw elements, product classes, and CSS rules instead of Astryx layout components and props. The official
ai-chattemplate has 0 raw layout elements and 2classNameprops in 763 lines. In the chat surface,chat-turn.tsxhas 48 lines withclassName,composer.tsxhas 47, andtool-activity.tsxhas 26. Renderer CSS carries 356display: flex/griddeclarations.Each hand-written layout needs its own CSS rule and its own spacing decision. That is where most of the CSS volume and the maintenance cost come from. It is also why small spacing inconsistencies keep appearing.
Desired outcome
Chat surface layout is expressed with Astryx
VStack,HStack, and component props such asgap,align, andwidth. The CSS rules that only existed to lay out those elements are deleted. The rendered pixels stay the same, except for listed and accepted differences.A fully lossless change is not always possible. Astryx
SpacingStepaccepts0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10and has no 2.5 step (10px). Renderer CSS uses--space-2-519 times and has 18 off-grid pixel literals in padding and gap. Where a value has no Astryx step, the PR either keeps a local rule with a/* local: ... */comment or snaps to the nearest step and lists the difference.Scope
One PR per surface, in this order:
Buttonoverride shrink from tracking(desktop): align shell chrome and settings with Astryx and DESIGN.md #4679 P3.1 — owned by open PR refactor(ui): restyle chat Buttons through themeProps targets #5928, separate from the completed layout slice.chat-surface-layout.tsx,chat-view.tsx).Remaining work uses the current Composer structure from #5927 and #5954. Preserve Stop/Resume/Send behavior, delivery recovery, owner boundaries and plugin slots. Audit frame wrappers individually: virtualizer, positioning and scroll behavior are product responsibilities. Coordinate frame edits with #5942 and #5615.
Out of scope: the process region (
ProcessingBlock,tool-activity.tsx) and failure notices. #5796 and #5797 redesign them.Acceptance criteria
.astryx-*selector and no new!important.docs/astryx-surface-file-inventory.mdis regenerated and stays at blocker 0.中文
属于 #5793。A0(#5794)已由 PR #5847 合并交付。2026-10-04 已按 upstream main
7c90bac2d核对范围;下方数字来自原始审计。问题
对话界面的大部分布局由原生元素、产品 class 和 CSS 规则搭成,而不是由 Astryx 布局组件和属性完成。官方
ai-chat模板 763 行里没有原生布局元素,只有 2 个className。对话界面中,chat-turn.tsx有 48 行带className,composer.tsx有 47 行,tool-activity.tsx有 26 行。渲染层 CSS 里有 356 条display: flex/grid声明。每一处手写布局都需要自己的 CSS 规则和自己的间距决定。CSS 的体量和维护成本主要来自这里,细小的间距不一致反复出现也是因为这个。
期望结果
对话界面的布局用 Astryx 的
VStack、HStack和组件属性(如gap、align、width)表达。只为这些元素布局而存在的 CSS 规则被删除。渲染出的像素保持不变,列出并接受的差异除外。完全无损并不总能做到。Astryx 的
SpacingStep只接受0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10,没有 2.5 档(10px)。渲染层 CSS 使用了 19 次--space-2-5,内边距和间距里还有 18 个不在网格上的像素字面量。遇到没有对应 Astryx 档位的值时,PR 要么保留一条带/* local: ... */注释的局部规则,要么吸附到最近的档位并列出差异。范围
每个区域一个 PR,按以下顺序:
Button覆盖收缩——由开放中的 PR refactor(ui): restyle chat Buttons through themeProps targets #5928 负责,与已完成的布局切片分开跟踪。chat-surface-layout.tsx、chat-view.tsx)。剩余工作使用 #5927 和 #5954 后的当前输入框结构。保留停止/恢复/发送行为、发送恢复、负责模块的边界和插件槽。逐个审计外框包裹元素:虚拟列表、定位和滚动行为属于产品职责。外框修改与 #5942、#5615 协调。
不在范围内:过程区(
ProcessingBlock、tool-activity.tsx)和失败提示。它们由 #5796 和 #5797 重新设计。验收标准
.astryx-*选择器,不新增!important。docs/astryx-surface-file-inventory.md,blocker 保持为 0。