Skip to content

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

fix(chat): quiet the conversation width handles

vastsa29b004a3cd8e
diff --git a/apps/desktop/src/styles/chat-shell.css b/apps/desktop/src/styles/chat-shell.css
index 47038cc21..4cad6086e 100644
--- a/apps/desktop/src/styles/chat-shell.css
+++ b/apps/desktop/src/styles/chat-shell.css
@@ -382,7 +382,9 @@
}
-/* Conversation width handles (D439). Rest: invisible. Hover: glow. Drag: hairline. */
+/* Conversation width handles (D439). Rest: invisible. Hover/drag: a short
+ * capsule, not a full-height glow. Dark uses a faint white ink mix; light
+ * uses a fainter black mix so the same rule does not read as a bright seam. */
.chat-width-handles {
position: absolute;
inset: 0 0 var(--composer-dock-height, 168px);
@@ -414,39 +416,48 @@
.chat-width-handle::before {
content: "";
position: absolute;
- inset-block: 18%;
+ top: 50%;
left: 50%;
width: 2px;
+ height: 40px;
border-radius: var(--radius-full);
- background: transparent;
+ background: color-mix(in oklab, var(--ds-text-primary) 18%, transparent);
box-shadow: none;
opacity: 0;
- transform: translateX(-50%);
+ transform: translate(-50%, -50%);
transition:
opacity var(--motion-duration-fast) var(--motion-ease-out),
- background var(--motion-duration-fast) var(--motion-ease-out),
- box-shadow var(--motion-duration-fast) var(--motion-ease-out),
- width var(--motion-duration-fast) var(--motion-ease-out);
+ height var(--motion-duration-fast) var(--motion-ease-out),
+ background var(--motion-duration-fast) var(--motion-ease-out);
+}
+
+:root[data-theme="light"] .chat-width-handle::before {
+ background: color-mix(in oklab, var(--ds-text-primary) 12%, transparent);
}
.chat-width-handle:hover::before,
.chat-width-handle:focus-visible::before {
opacity: 1;
- width: 2px;
- background: color-mix(in oklab, var(--ds-focus) 28%, transparent);
- box-shadow: 0 0 12px 3px color-mix(in oklab, var(--ds-focus) 22%, transparent);
}
.chat-width-handle:focus-visible {
outline: none;
}
+.chat-width-handle:focus-visible::before {
+ box-shadow: 0 0 0 2px color-mix(in oklab, var(--ds-accent) 22%, transparent);
+}
+
.chat-width-handle.is-resizing::before,
.chat-surface[data-chat-resizing="true"] .chat-width-handle::before {
opacity: 1;
- width: 1px;
- background: color-mix(in oklab, var(--ds-focus) 55%, transparent);
- box-shadow: 0 0 16px 4px color-mix(in oklab, var(--ds-focus) 28%, transparent);
+ height: 56px;
+ background: color-mix(in oklab, var(--ds-text-primary) 32%, transparent);
+}
+
+:root[data-theme="light"] .chat-width-handle.is-resizing::before,
+:root[data-theme="light"] .chat-surface[data-chat-resizing="true"] .chat-width-handle::before {
+ background: color-mix(in oklab, var(--ds-text-primary) 20%, transparent);
}
.chat-surface[data-chat-resizing="true"] .thread-content,
@@ -467,6 +478,7 @@
}
}
+
/* Conversation minimap: packed stack of dashes on the thread's left edge,
* centered inside the safe span between titlebar and docked composer. Dense
* stacks reduce their gap and marker pitch instead of escaping that span.
diff --git a/apps/desktop/test/chat-content-width.test.mjs b/apps/desktop/test/chat-content-width.test.mjs
index 396dce27f..40bca9b87 100644
--- a/apps/desktop/test/chat-content-width.test.mjs
+++ b/apps/desktop/test/chat-content-width.test.mjs
@@ -22,17 +22,24 @@ test("chat surface mounts dual width handles", () => {
assert.match(handleSource, /nav\.resizeChatWidth/);
});
-test("chat width handles are invisible at rest and glow on hover or drag", () => {
+test("chat width handles are invisible at rest and show a quiet capsule on hover", () => {
const handle = styles.match(/\.chat-width-handle::before\s*\{[\s\S]*?\}/)?.[0] ?? "";
assert.match(handle, /opacity:\s*0/);
+ assert.match(handle, /height:\s*40px/);
+ assert.match(handle, /var\(--ds-text-primary\) 18%/);
+ assert.doesNotMatch(handle, /box-shadow:\s*0 0 12px/);
assert.match(styles, /\.chat-width-handle:hover::before/);
+ assert.match(
+ styles,
+ /:root\[data-theme="light"\] \.chat-width-handle::before/,
+ );
assert.match(
styles,
/\.chat-surface\[data-chat-resizing="true"\] \.chat-width-handle::before/,
);
- assert.match(styles, /box-shadow:\s*0 0 12px 3px/);
});
+
test("a squeezed pane keeps min\(100%, preferred\) and does not force 640px", () => {
assert.match(styles, /--chat-content-max-width:\s*760px/);
assert.doesNotMatch(
diff --git a/docs/adr/0274-draggable-chat-content-width.md b/docs/adr/0274-draggable-chat-content-width.md
index dc31c945b..370b2072e 100644
--- a/docs/adr/0274-draggable-chat-content-width.md
+++ b/docs/adr/0274-draggable-chat-content-width.md
@@ -33,10 +33,12 @@ work-panel squeeze, or a one-off wider reading of a diff.
from the top of `.chat-surface` down to the composer dock. Both handles
change the same width (1px pointer → 2px band) so the column stays
centered. Drag minimum is **560px**, or the available pane if smaller.
-3. Rest: the handles are invisible. Hover/focus: a soft glow. Drag: a 1px
- hairline plus glow on **both** edges. Double-click resets to 760.
+3. Rest: the handles are invisible. Hover/focus: a short 2×40px capsule mixed
+ from `--ds-text-primary` (18% on dark, 12% on light). Drag: both capsules
+ lengthen to 56px at a slightly stronger mix. Double-click resets to 760.
Arrow keys step 16px (Shift 32px); Home restores 760; End expands to the
pane; Escape cancels an in-flight drag.
+
4. User bubbles stay `min(82%, 600px)`. Assistant, tool, permission, ask,
review, and turn-outcome rows follow `--chat-prose-max-width`, which
tracks the band. The collapsed-sidebar 640px ceiling is removed.
diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.md
index 5d22b1e51..bc3bb31aa 100644
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@ -1471,10 +1471,12 @@ Single message render — either user (plaintext) or assistant (markdown streami
- The live band is `min(available pane, preferred)`. Collapsing the sidebar
no longer tightens a 640px ceiling; the outer pane stays fluid and the
width transition follows the sidebar dock.
-- Dual 12px handles sit on the band edges: invisible at rest, glow on hover
- or focus, 1px hairline plus glow while dragging. Double-click resets to
- 760px. Arrow keys step the width; Home restores the default; End fills the
- pane.
+- Dual 12px handles sit on the band edges: invisible at rest; hover/focus
+ reveals a short 2×40px capsule mixed from `--ds-text-primary` (18% dark /
+ 12% light). Dragging lengthens it to 56px at a slightly stronger mix.
+ Double-click resets to 760px. Arrow keys step the width; Home restores the
+ default; End fills the pane.
+
- User: right-aligned, theme-neutral soft plate (`color-mix` on primary ink,
never a fixed accent tint), borderless, `radius-lg-plus` with a tighter
bottom-right corner, capped at `min(82%, 600px)` so short prompts read as
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 031cc0d19..601048f45 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -4249,10 +4249,10 @@ identify the platform validation still needed.
- **Preconditions**: PI-Desktop is open on chat (empty home or a transcript)
at a viewport wider than 760px. Reduced motion off.
- **Steps**: 1) Confirm no divider is visible at rest. 2) Hover the left
- content edge and confirm a glow, then the right edge. 3) Drag the right
- handle outward and confirm both edges move, the composer matches, and a
- hairline is visible while dragging. 4) Open the work panel or expand the
- sidebar until the pane is narrower than the new preference; the band
+ content edge and confirm a short faint capsule, then the right edge. 3) Drag
+ the right handle outward and confirm both edges move, the composer matches,
+ and both capsules lengthen slightly while dragging. 4) Open the work panel or
+ expand the sidebar until the pane is narrower than the new preference; the band
compresses without a horizontal scroll. 5) Close the panel / collapse the
sidebar and confirm the preference returns. 6) Double-click a handle to
restore 760px. 7) Repeat with Arrow keys on a focused handle.
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index c8cae6c6e..ef7f299df 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -5795,9 +5795,10 @@ that was sitting at the bottom — including after the turn had finished.
- The centered conversation band, empty-home stack, and composer share one
preferred max width, default 760px, persisted as
- `AppSettings.chatContentMaxWidth`. Dual edge handles (invisible at rest,
- glow on hover, hairline while dragging) change that width together so the
- column stays centered. Drag floor is 560px.
+ `AppSettings.chatContentMaxWidth`. Dual edge handles (invisible at rest;
+ a short primary-ink capsule on hover, slightly stronger while dragging)
+ change that width together so the column stays centered. Drag floor is 560px.
+
- The live used width is `min(available pane minus 24px gutters, preferred)`,
so a squeezed sidebar or work panel compresses the band without rewriting
the preference. The collapsed-sidebar 640px ceiling is removed.
diff --git a/docs/zh-CN/spec/08-meta/decisions-log.md b/docs/zh-CN/spec/08-meta/decisions-log.md
index 6c0ba3bf0..017a946aa 100644
--- a/docs/zh-CN/spec/08-meta/decisions-log.md
+++ b/docs/zh-CN/spec/08-meta/decisions-log.md
@@ -4335,7 +4335,8 @@ that amendment are retired by ADR 0268; the upstream work-panel lifecycle stays.
## 2026-09-16 —— 可拖拽的对话内容宽度(D439)
- 居中的对话带、空首页和输入框共用一个首选最大宽度,默认 760px,持久化为
- `AppSettings.chatContentMaxWidth`。左右边缘各一条手柄(静止不可见、悬停光晕、拖拽时显示细线)同步改这个宽度,列保持居中。拖拽下限 560px。
+ `AppSettings.chatContentMaxWidth`。左右边缘各一条手柄(静止不可见;悬停显示短胶囊,拖拽时略加长加深)同步改这个宽度,列保持居中。拖拽下限 560px。
+
- 实际宽度是 `min(可用窗格减去两侧 24px, 首选值)`,侧栏或工作区挤压时自适应压缩,不改写偏好。收起侧栏不再把内容带到 640px。
- 助手/工具/决策行跟随内容带;用户气泡仍是 `min(82%, 600px)`。仅渲染器。见 ADR 0274、E2E-208、E2E-CHAT-content-width-handles。