Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
fix(composer): occlude transcript below dock
xjx32796da531ab
diff --git a/apps/desktop/src/styles/composer.css b/apps/desktop/src/styles/composer.cssindex a6c1b2c05..778ce52b2 100644--- a/apps/desktop/src/styles/composer.css+++ b/apps/desktop/src/styles/composer.css@@ -11,15 +11,15 @@width: 100%;}-/* Thread mode: floating bottom dock. The transcript already reserves the- * composer's measured height, so a full-width gradient veil is unnecessary- * and makes the lower half of the conversation look hazy. */+/* Thread mode: floating bottom dock. The transcript reserves the composer's+ * measured height for scrolling, while this solid workspace-coloured band+ * clips transcript paint before it can remain visible below the shell. */.composer-dock-docked {position: absolute;inset-inline: 0;bottom: 0;padding: 0 24px 16px;- background: transparent;+ background: var(--ds-bg-primary);}/* Home mode: the shell is owned by the bottom-reserved home composer region. */diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.mdindex e45b35364..3b478d5f3 100644--- a/docs/spec/04-ux/08-component-spec.md+++ b/docs/spec/04-ux/08-component-spec.md@@ -2598,7 +2598,10 @@ reasoning-level control.`.composer-shell`, `.composer-input-wrap`, `.composer-input`, and`.composer-toolbar` spacing, minimum heights, theme surfaces, and controls.Only the parent placement and the localized placeholder copy differ between- the empty home and a recorded conversation.+ the empty home and a recorded conversation. In a recorded conversation,+ `.composer-dock-docked` paints the primary workspace background across its+ full width. This occlusion band prevents transcript rows from remaining+ visible beneath the floating shell or through its rounded outer corners.- Empty draft height: `.composer-input` uses `min-height: 3lh`, so an idlecomposer shows three lines of input before it grows with the draft.- Scroll stability: The thread scrollport reserves one stable trailing gutter,diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.mdindex bb5ad75e3..633147bb7 100644--- a/docs/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/spec/06-delivery/04-e2e-test-plan.md@@ -5639,17 +5639,22 @@ identify the platform validation still needed.entered CDP or output. The default no-key run remains 5/5 with the live caseexplicitly skipped.-#### E2E-CHAT-opaque-floating-decision-and-retry-surfaces: Plan approval and retry hover stay opaque+#### E2E-CHAT-opaque-floating-decision-and-retry-surfaces: Dock, Plan approval, and retry surfaces occlude transcript text-- **Status**: Automated (`apps/desktop/test/plan-mode-source-contract.test.mjs`, `apps/desktop/test/active-turn-surface.test.mjs`)+- **Status**: Automated (`pnpm test:e2e:composer-occlusion`, `pnpm test:e2e:theme-surfaces`, `apps/desktop/test/plan-mode-source-contract.test.mjs`, `apps/desktop/test/active-turn-surface.test.mjs`)- **Priority**: P2- **Covers**: C, Quality / floating composer and retry surfaces- **Preconditions**: Renderer CSS is the production source under `apps/desktop/src/styles`.- **Steps**:- 1. Inspect `.plan-approval-bar` in the composer dock styles.- 2. Inspect `.run-activity-error-popover.message-error` in the transcript styles.- 3. Hover or focus a retrying active-turn row in a live session.+ 1. Inspect the computed background of `.composer-dock-docked` in both built-in themes and a custom theme.+ 2. Scroll a long transcript until a row passes beneath the floating Composer.+ 3. Inspect `.plan-approval-bar` in the composer dock styles.+ 4. Inspect `.run-activity-error-popover.message-error` in the transcript styles.+ 5. Hover or focus a retrying active-turn row in a live session.- **Expected**:+ - The dock paints the opaque `--ds-bg-primary` workspace surface across its+ full width. Transcript text disappears at the Composer boundary and cannot+ remain visible below the shell or around its rounded corners.- The Plan/Goal approval bar paints `--ds-bg-composer` with `--ds-shadow-composer` rather than the in-flow `--ds-tile` wash, so it remains a readable plate over the transparent composer dock.- The retry hover tooltip mixes the error tint over `--ds-bg-elevated-opaque`, so transcript text does not show through.- The retry tooltip is capped to the room above the tail status row anddiff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.mdindex ede070476..7bbc72bf2 100644--- a/docs/spec/08-meta/decisions-log.md+++ b/docs/spec/08-meta/decisions-log.md@@ -6457,3 +6457,16 @@ that was sitting at the bottom — including after the turn had finished.`03-runtime/07-process-model.md` §4, `03-runtime/09-logging-and-observability.md`,and `03-runtime/04-data-storage.md`.+## 2026-09-20 — The dock occludes transcript paint below Composer (D603, issue #728)++- The transcript scrollport fills the conversation pane while its content+ reserves the measured Composer height. Because the absolutely positioned dock+ was transparent, a row could keep painting below the floating shell and stay+ visible in its bottom gap or outside its rounded corners.+- `.composer-dock-docked` now paints the opaque `--ds-bg-primary` workspace+ surface across its full width. The Composer retains its existing translucent+ elevated token, radius, shadow, and measured scroll reserve; the backing band+ removes only transcript paint that has crossed the Composer boundary.+- Renderer CSS and the theme surface regression change only. There is no scroll+ state, protocol, persistence, theme schema, or permission change. See+ `04-ux/08-component-spec.md` and E2E-CHAT-opaque-floating-decision-and-retry-surfaces.diff --git a/docs/zh-CN/spec/04-ux/08-component-spec.md b/docs/zh-CN/spec/04-ux/08-component-spec.mdindex 7295f9843..d44fbf1d8 100644--- a/docs/zh-CN/spec/04-ux/08-component-spec.md+++ b/docs/zh-CN/spec/04-ux/08-component-spec.md@@ -1845,6 +1845,8 @@ MainChat 底部的输入区域,用于撰写和发送提示。支持多行输在主模式或线程对接模式下保留在外壳上方 (D095)- 背景:一个坚实的语义输入框表面;无内部梯度,背景图像,或装饰水洗+- 会话中的 `.composer-dock-docked` 使用主工作区背景绘制整条停靠区域,+ 遮住滚到悬浮输入框下方以及圆角外侧的正文;首页模式不绘制这条遮罩。- 仰角:20px半径,只有克制的柔和阴影;细线描边已在 D297 移除;停靠的文字淡入淡出位于输入框外壳之外- solid/near-opaque 表面不使用 `backdrop-filter`; focus-within 添加了一个diff --git a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.mdindex f2260c45e..75163484e 100644--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md@@ -3796,17 +3796,21 @@ IPC 请求无法关闭。输入 CDP 或输出。默认无钥匙运行仍为 5/5 与现场案例明确跳过。-#### E2E-CHAT-opaque-floating-decision-and-retry-surfaces:Plan 审批条与重试 hover 保持不透明+#### E2E-CHAT-opaque-floating-decision-and-retry-surfaces:停靠区、Plan 审批条与重试表面遮住正文-- **状态**:已自动化(`apps/desktop/test/plan-mode-source-contract.test.mjs`、`apps/desktop/test/active-turn-surface.test.mjs`)+- **状态**:已自动化(`pnpm test:e2e:composer-occlusion`、`pnpm test:e2e:theme-surfaces`、`apps/desktop/test/plan-mode-source-contract.test.mjs`、`apps/desktop/test/active-turn-surface.test.mjs`)- **优先级**:P2- **覆盖**:C、品质 / 浮动 Composer 与重试表面- **先决条件**:渲染器 CSS 为 `apps/desktop/src/styles` 下的生产源。- **步骤**:- 1. 检查 Composer 停靠栏样式中的 `.plan-approval-bar`。- 2. 检查记录样式中的 `.run-activity-error-popover.message-error`。- 3. 在实时会话中悬停或聚焦正在重试的活动行。+ 1. 在两套内置主题和一套自定义主题中检查 `.composer-dock-docked` 的计算背景。+ 2. 滚动长会话,让一行正文经过悬浮 Composer 下方。+ 3. 检查 Composer 停靠栏样式中的 `.plan-approval-bar`。+ 4. 检查记录样式中的 `.run-activity-error-popover.message-error`。+ 5. 在实时会话中悬停或聚焦正在重试的活动行。- **预期**:+ - 停靠区横跨整个宽度绘制不透明的 `--ds-bg-primary` 工作区表面;正文在+ Composer 边界处消失,不会留在输入框下方或圆角外侧。- Plan/Goal 审批条使用 `--ds-bg-composer` 加 `--ds-shadow-composer`,而不是正文流里的 `--ds-tile` 薄洗,因此在透明停靠栏上仍可读。- 重试 hover tooltip 把错误色混在 `--ds-bg-elevated-opaque` 上,记录正文不会透出。- 重试 tooltip 的高度被限制在尾部状态行上方的可用空间内,其余部分可滚动,diff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.mdindex d3400b922..f0a0e847e 100644--- a/docs/zh-CN/spec/08-meta/decisions-log.md+++ b/docs/zh-CN/spec/08-meta/decisions-log.md@@ -4589,3 +4589,13 @@ that amendment are retired by ADR 0268; the upstream work-panel lifecycle stays.什么都不上传。见 `03-runtime/07-process-model.md` §4、`03-runtime/09-logging-and-observability.md` 与 `03-runtime/04-data-storage.md`。+## 2026-09-20 —— Composer 下方的停靠区遮住正文绘制(D603,issue #728)++- 正文滚动容器占满会话面板,内容通过实测 Composer 高度预留底部空间。此前绝对定位的+ 停靠区是透明的,因此正文行可以继续绘制到悬浮输入框下方,并从底部空隙或圆角外侧露出。+- `.composer-dock-docked` 现在横跨整个宽度绘制不透明的 `--ds-bg-primary` 工作区表面。+ Composer 原有的半透明高架令牌、圆角、阴影和滚动预留保持不变;底层遮罩只移除越过+ Composer 边界的正文绘制。+- 仅改动渲染器 CSS 与主题表面回归测试;不改变滚动状态、协议、持久化、主题 schema+ 或权限。见 `04-ux/08-component-spec.md` 与+ E2E-CHAT-opaque-floating-decision-and-retry-surfaces。diff --git a/package.json b/package.jsonindex 9629a92e2..3e7a3885b 100644--- a/package.json+++ b/package.json@@ -26,6 +26,7 @@"test:e2e:plan": "node scripts/e2e-plan.mjs","test:e2e:plan-ui": "node scripts/e2e-plan-ui.mjs","test:e2e:theme-surfaces": "node scripts/e2e-theme-surfaces.mjs",+ "test:e2e:composer-occlusion": "node scripts/e2e-theme-surfaces.mjs --dock-mask-only","test:e2e:composer-autocomplete": "node scripts/e2e-composer-autocomplete.mjs","test:e2e:composer-paste": "node scripts/e2e-composer-paste.mjs","test:e2e:transcript": "node scripts/e2e-transcript-render.mjs",diff --git a/scripts/e2e-theme-surfaces.mjs b/scripts/e2e-theme-surfaces.mjsindex b5eb90f25..a285106e7 100644--- a/scripts/e2e-theme-surfaces.mjs+++ b/scripts/e2e-theme-surfaces.mjs@@ -9,6 +9,9 @@ import { fileURLToPath } from "node:url";import { resolveElectronBinary } from "./e2e/boot.mjs";const root = join(dirname(fileURLToPath(import.meta.url)), "..");+const probeName = process.argv.includes("--dock-mask-only")+ ? "themeDockMaskProbe"+ : "themeSurfacesProbe";const { electronBinary } = resolveElectronBinary(root);const temp = await mkdtemp(join(tmpdir(), "pi-theme-surfaces-"));try {@@ -19,9 +22,9 @@ try {const css = [...appHtml.matchAll(/href="([^" ]+\.css)"/g)].map((match) => match[1]);assert(css.length, "Build the app with pnpm build:js before running this check");await cp(join(renderer, "assets"), join(temp, "assets"), { recursive: true });- await writeFile(join(temp, "index.html"), `<!doctype html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self' data:"><title>Theme surface regression</title>${css.map((path) => `<link rel="stylesheet" href="${path}">`).join("")}<style>body { padding: 32px; display: flex; gap: 32px; align-items: flex-start; } .fixture-controls { width: 420px; display: grid; gap: 24px; } .fixture-prose { width: 420px; display: grid; gap: 12px; } .settings-shell-full { width: 275px; height: 340px; } .settings-toggle { margin: 20px; } /* The veils are fixed full-screen layers in the app; keep them in flow here so they do not cover the other fixtures. Only position changes, never the paint. */ .fixture-controls .overlay, .fixture-controls .plugins-modal-backdrop { position: static; inset: auto; padding: 12px; animation: none; }</style><body>+ await writeFile(join(temp, "index.html"), `<!doctype html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self' data:"><title>Theme surface regression</title>${css.map((path) => `<link rel="stylesheet" href="${path}">`).join("")}<style>body { padding: 32px; display: flex; gap: 32px; align-items: flex-start; } .fixture-controls { width: 420px; display: grid; gap: 24px; } .fixture-prose { width: 420px; display: grid; gap: 12px; } .settings-shell-full { width: 275px; height: 340px; } .settings-toggle { margin: 20px; } /* Fixed/absolute app layers stay in flow here so they do not cover other fixtures. Only position changes, never paint. */ .fixture-controls .overlay, .fixture-controls .plugins-modal-backdrop, .fixture-controls .composer-dock-docked { position: static; inset: auto; padding: 12px; animation: none; }</style><body><section class="settings-shell-full"><nav class="settings-nav sidebar-surface"><div class="settings-nav-top"><input class="settings-search" placeholder="Search settings"></div><div class="settings-nav-scroll"><button class="settings-nav-item active">General</button><button class="settings-nav-item">Appearance</button><button class="settings-toggle on" aria-label="Enabled"><span class="settings-toggle-thumb"></span></button></div></nav></section>- <section class="fixture-controls"><div class="composer-shell">Composer surface</div><input class="plugins-search" placeholder="Search plugins"><div class="agent-capability-search-wrap"><input class="agent-capability-search" placeholder="Search capabilities"></div><div class="overlay">Dialog scrim</div><div class="plugins-modal-backdrop">Permission veil</div></section>+ <section class="fixture-controls"><div class="composer-shell">Composer surface</div><div class="composer-dock composer-dock-docked">Transcript occlusion band</div><input class="plugins-search" placeholder="Search plugins"><div class="agent-capability-search-wrap"><input class="agent-capability-search" placeholder="Search capabilities"></div><div class="overlay">Dialog scrim</div><div class="plugins-modal-backdrop">Permission veil</div></section><section class="fixture-controls"><div class="composer-stack"><section class="asktool-card"><div class="asktool-card-header"><span class="asktool-card-title">Question</span></div><button class="asktool-option">Blue</button><button class="asktool-option selected">Green</button><input class="asktool-custom-input" placeholder="Other" aria-label="Other"></section></div></section><section class="fixture-prose"><div class="prose-chat"><p>Answer prose with a <kbd>K</kbd> keycap and an <code>inline chip</code>.</p></div><div class="thinking-prose"><code>thinking code</code></div><div class="code-block-head">Code card head band</div><div class="mermaid-block-body">Mermaid canvas</div><button class="send-btn" disabled>Send</button></section><section class="fixture-tools"><div class="tool-row-content">Tool output</div><div class="tool-block is-plain"><div class="tool-row-content">Plain tool output</div></div><div class="tool-row-content is-error">Error tool output</div></section>@@ -45,7 +48,7 @@ app.whenReady().then(async () => {const checks = [];for (const theme of ["light", "dark"]) {for (const custom of [false, true, false]) {- const result = await window.webContents.executeJavaScript("globalThis.themeSurfacesProbe(" + JSON.stringify(theme) + "," + custom + ")");+ const result = await window.webContents.executeJavaScript("globalThis.${probeName}(" + JSON.stringify(theme) + "," + custom + ")");checks.push(result);if (process.env.PI_E2E_ARTIFACT_DIR) {const fs = require("node:fs");diff --git a/scripts/e2e/theme-surfaces.js b/scripts/e2e/theme-surfaces.jsindex 2c491532d..34cafe701 100644--- a/scripts/e2e/theme-surfaces.js+++ b/scripts/e2e/theme-surfaces.js@@ -34,6 +34,7 @@ const surfaces = {kbd: [".prose-chat kbd", "--ds-prose-kbd-fg", "ink"],asktoolCard: [".composer-stack > .asktool-card", "--ds-bg-composer"],asktoolOption: [".asktool-option", "--ds-tile-deep"],+ dockMask: [".composer-dock-docked", "--ds-bg-primary"],};// Issue #360: the dock question card rides the composer plate and its option@@ -41,15 +42,18 @@ const surfaces = {Object.assign(DEFAULT_RGBA.light, {asktoolCard: [255, 255, 255, 255],asktoolOption: [26, 26, 26, 20],+ dockMask: [255, 255, 255, 255],});Object.assign(DEFAULT_RGBA.dark, {asktoolCard: [33, 33, 33, 245],asktoolOption: [255, 255, 255, 20],+ dockMask: [24, 24, 24, 255],});const COMPOSER_SHADOW = "rgba(0, 0, 0, 0.04) 0px 3px 7.5px 0px, rgba(0, 0, 0, 0.05) 0px 0px 20px 0px";Object.assign(DEFAULT_SHADOWS.light, { asktoolCard: COMPOSER_SHADOW });Object.assign(DEFAULT_SHADOWS.dark, { asktoolCard: COMPOSER_SHADOW });const customColors = {+ "--ds-bg-primary": "#26313d","--ds-settings-rail-bg": "#243645","--ds-settings-field-bg": "#365476","--ds-settings-nav-active": "#526f82",@@ -139,3 +143,18 @@ globalThis.themeSurfacesProbe = async (theme, custom) => {elevatedToken: getComputedStyle(document.documentElement).getPropertyValue("--ds-bg-elevated-primary").trim(),elevatedRgba: rgba(getComputedStyle(document.documentElement).getPropertyValue("--ds-bg-elevated-primary").trim()) };};++// The Composer occlusion regression is intentionally independent from the+// fixture's keyboard-focus checks, whose :focus-visible state depends on the+// test window owning macOS foreground focus.+globalThis.themeDockMaskProbe = async (theme, custom) => {+ const result = await globalThis.themeSurfacesProbe(theme, custom);+ const dock = result.values.dockMask;+ const expected = rgba(+ getComputedStyle(document.documentElement).getPropertyValue("--ds-bg-primary").trim(),+ );+ const failures = [];+ if (String(dock.rgba) !== String(expected)) failures.push("dock mask ignores --ds-bg-primary");+ if (dock.rgba[3] !== 255) failures.push("dock mask is not opaque");+ return { ok: failures.length === 0, theme, custom, dock, expected, failures };+};