Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

docs(spec): record the single chrome control geometry

ZeroY7e48ef36cbd0
diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.md
index e5f36eb78..d19d825ad 100644
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@ -269,6 +269,11 @@ combined model × reasoning selection (§11).
native drag rectangle is the border box. The control band continues the
titlebar's `border-subtle` bottom rule and uses the same token for its
leading divider.
+- Every chrome icon control is one 28px square (`--ds-work-panel-toggle-size`):
+ the topbar's dock toggle, the viewport-fixed work-panel toggle, and the
+ preview/route-band lane actions. The lane's two actions match their siblings
+ instead of rendering at a size of their own, and the panel header's lane
+ reserve is derived from that same control size rather than from a literal.
- Band reservation is platform-independent (D269). The band is opaque and
absolutely positioned, so scrolling route content passes underneath it on
every platform, macOS included. Every route surface that starts its own
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index 6fe2f10e3..f2088df8e 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -5467,6 +5467,24 @@ that was sitting at the bottom — including after the turn had finished.
See `04-ux/07-ui-design-system.md` §11.1 and `04-ux/08-component-spec.md`
§3.7.
+## 2026-09-16 — One geometry for every chrome icon control
+
+- The preview- and route-band lane actions (`.title-nav-btn`) rendered as 22px
+ tiles with `--radius-2xs` and a `--ds-tile` seat, beside 28px siblings: the
+ same dock toggle in the conversation topbar, the viewport-fixed work-panel
+ toggle, and the work-panel's own actions. One control, two sizes and two
+ shapes, in the same 46px band.
+- Those actions now take the shared chrome-control geometry (the `.ct-icon-btn`
+ group): a 28px square from `--ds-work-panel-toggle-size`, `flex: 0 0` so a
+ crowded band cannot squeeze them out of square, `--radius-md`, a transparent
+ seat with the semantic hover wash, and the 15px glyph every other chrome
+ control uses. `.title-nav-btn` keeps only its press feedback and active tone.
+- The preview action lane is derived from the control it reserves room for:
+ `--ds-preview-action-lane-width: calc(2 * var(--ds-work-panel-toggle-size) + 4px + 8px)`,
+ so the panel header's reserve and the buttons cannot drift apart.
+- Renderer only: no protocol, storage, host, permission, or migration change.
+ See `04-ux/08-component-spec.md` §2.
+
## 2026-09-16 — The macOS traffic-light reserve has one source (D433)
- The renderer's windowed lead-in for the macOS traffic lights was a hand-copied
diff --git a/docs/zh-CN/spec/04-ux/08-component-spec.md b/docs/zh-CN/spec/04-ux/08-component-spec.md
index c77a5fbdf..5cdf2f4d1 100644
--- a/docs/zh-CN/spec/04-ux/08-component-spec.md
+++ b/docs/zh-CN/spec/04-ux/08-component-spec.md
@@ -221,6 +221,10 @@ Composer 拥有 Agent/Plan/Goal 控件以及组合的模型 × 推理选择(§
`--ds-toolbar-height` 填充。缺少这一保留时,页面标头会渲染到带的后面,
标题行被遮挡。只有叠在带之上的表面(`z-index: 60` 的插件详情侧面板)
可以跳过它。
+- 每个 chrome 图标控件都是同一个 28px 方形(`--ds-work-panel-toggle-size`):
+ 顶栏的侧边栏开关、视口固定的工作面板开关,以及预览态/路由带上的动作组。
+ 因此那两颗动作按钮与其同级控件尺寸一致,不再使用自己更小的尺寸;面板头部
+ 为动作组预留的车道宽度也由同一个控件尺寸推导,而不是写死的字面量。
### 2.4 状态
diff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.md
index ab44eea19..31cc2e5b6 100644
--- a/docs/zh-CN/spec/08-meta/decisions-log.md
+++ b/docs/zh-CN/spec/08-meta/decisions-log.md
@@ -4220,6 +4220,13 @@ the retained upstream work-panel lifecycle. See
- `.composer-right .icon-btn` 不再设置水平内边距。带文字的模型/思考胶囊自己用 `!important` 设置内边距,所以那条声明只会把它旁边的纯图标控件撑宽;增强控件在加载态仍保留自己的带文字几何。
- 仅渲染层:无协议、存储、宿主、权限或迁移改动。见 `04-ux/07-ui-design-system.md` §11.1 与 `04-ux/08-component-spec.md` §3.7。
+## 2026-09-16 —— 每个 chrome 图标控件共用一套几何
+
+- 预览态与路由带上的动作按钮(`.title-nav-btn`)此前渲染为 22px 的方块,使用 `--radius-2xs` 与 `--ds-tile` 底色,而它们的同级控件是 28px:会话顶栏里同一个侧边栏开关、视口固定的工作面板开关,以及工作面板自身的操作。同一个控件、同一个 46px 带内,却有两种尺寸和两种形状。
+- 这些动作按钮现在采用共享的 chrome 控件几何(`.ct-icon-btn` 组):由 `--ds-work-panel-toggle-size` 得到的 28px 正方形、`flex: 0 0` 以免拥挤的带把它们挤扁、`--radius-md`、透明底座加语义化 hover 底色,以及其它 chrome 控件统一使用的 15px 图形。`.title-nav-btn` 只保留按压反馈与 active 色调。
+- 预览态动作组的车道宽度改为由它所预留的控件推导:`--ds-preview-action-lane-width: calc(2 * var(--ds-work-panel-toggle-size) + 4px + 8px)`,这样面板头部的预留与按钮本身不会再各自漂移。
+- 仅渲染层:无协议、存储、宿主、权限或迁移改动。见 `04-ux/08-component-spec.md` §2。
+
## 2026-09-16 —— macOS 交通灯预留量只有一个来源(D433)
- 渲染层为 macOS 交通灯留出的窗口模式引导内缩,原本是一个手抄的 `76px`:散在 `apps/desktop/src/styles/chrome.css` 与 `apps/desktop/src/styles/work-panel.css` 里的五处声明 —— `.main-titlebar-left`(`64px`,即该值减去行自身的 12px 内边距)、`.conversation-topbar.ct-collapsed`(`--ct-lead-inset`)、`.sidebar-header`、`.window-chrome-row:not(.sidebar-expanded)`,以及预览态的 `.work-panel-header`(`calc(76px + var(--ds-preview-action-lane-width))`)—— 每一处还各有一个 `[data-fullscreen="true"]` 分身。它们谁都没有和主进程交给 Electron 的 `trafficLightPosition` 建立关联,因此任一侧单独改动都会与另一侧漂移。