From 8f7d3f9cfc2ecfa8b93ada83b26ed33a9bfa2801 Mon Sep 17 00:00:00 2001 From: Leo Li Date: Sat, 31 Oct 2026 10:07:20 +0000 Subject: [PATCH 1/5] Running tray: Stop inside its line, one chevron column, the header time after its counts The open tray hung each line's Stop below and right of the line, outside its box and off its centre, and the header's chevron and the lines' sat in two columns. The folded header floated its elapsed time in a column of its own far from the counts, behind a chat bubble. - Each line: time, state, Stop's track, then the chevron, last at the row's end. Stop lies over its track, one row tall from the line's top (its controls' row when narrow), centred, with its own absolute offsets reset. - The header: a running mark (the shared spinner while work runs), the counts, the elapsed time as quiet meta one gap after them, and the chevron in the same trailing column as every line's and View all's. One row at every width. - Gallery agent-pane.subagent-tray-head with three header arms (trayHead.experiment.ts: spinner, still glyph, no mark); spinner is the default. - test/subagent-tray-trailing.test.ts measures Stop inside its row and centred and every chevron on one x, at 760 and 300px, light and dark. Co-Authored-By: Claude Opus 5.5 --- .../src/agent-session/acpmux/bottomStack.css | 9 +- .../acpmux/subagents/AgentLine.tsx | 15 +- .../acpmux/subagents/SubagentTray.tsx | 27 ++- .../subagents/SubagentTrayHead.gallery.ts | 93 ++++++++++ .../acpmux/subagents/subagents.css | 70 ++++++-- .../acpmux/subagents/trayHead.experiment.ts | 28 +++ webviews/src/experiments/registry.ts | 2 + webviews/test/subagent-tray-columns.test.ts | 36 ++-- webviews/test/subagent-tray-layout.test.ts | 6 +- webviews/test/subagent-tray-trailing.test.ts | 168 ++++++++++++++++++ 10 files changed, 398 insertions(+), 56 deletions(-) create mode 100644 webviews/src/agent-session/acpmux/subagents/SubagentTrayHead.gallery.ts create mode 100644 webviews/src/agent-session/acpmux/subagents/trayHead.experiment.ts create mode 100644 webviews/test/subagent-tray-trailing.test.ts diff --git a/webviews/src/agent-session/acpmux/bottomStack.css b/webviews/src/agent-session/acpmux/bottomStack.css index 0be800fe9bcc..18cc7f446251 100644 --- a/webviews/src/agent-session/acpmux/bottomStack.css +++ b/webviews/src/agent-session/acpmux/bottomStack.css @@ -171,10 +171,6 @@ stupid-ass fucking padding"). */ min-height: var(--ui-row-height, var(--ds-control-row, 28px)); } -.acpmux-dock > .acpmux-running-tray[data-narrow] { - --acpmux-tray-header-lines: 2; - min-height: calc(2 * var(--ui-row-height, var(--ds-control-row, 28px))); -} @media (min-height: 360px) { /* Not while the fold plays (conversation/fold.ts clips it with an inline overflow then): the fold's own height carries the tray, so open and close never jump by the reservation. */ @@ -182,8 +178,9 @@ > .acpmux-running-tray:has( > .acpmux-running-tray__fold:not([style*="overflow"]) > .acpmux-running-tray__finished ) { - /* View all needs one row in addition to the header's one or two lines. */ - min-height: calc((var(--acpmux-tray-header-lines, 1) + 1) * var(--ui-row-height, var(--ds-control-row, 28px)) + var(--ds-space-1) / 2 + 2 * var(--cmux-hairline)); + /* View all needs one row in addition to the header's one, narrow too: the header's time follows + its counts on its one line (subagents.css), so it never takes a second. */ + min-height: calc(2 * var(--ui-row-height, var(--ds-control-row, 28px)) + var(--ds-space-1) / 2 + 2 * var(--cmux-hairline)); } } /* A pane too short for both pinned rows and the composer (a webview under 360px) keeps the composer diff --git a/webviews/src/agent-session/acpmux/subagents/AgentLine.tsx b/webviews/src/agent-session/acpmux/subagents/AgentLine.tsx index 0619ad38b273..bebe636eaf39 100644 --- a/webviews/src/agent-session/acpmux/subagents/AgentLine.tsx +++ b/webviews/src/agent-session/acpmux/subagents/AgentLine.tsx @@ -156,12 +156,17 @@ export function AgentLine({ {/* Running turns to Waiting or Done with a tick, never a jump (trayMotion.tsx). */} - {chevron && onOpen && ( - - )} + {/* Stop's track (the stop slot, outside this button, lies over it), then the chevron's, + last at the line's end: the column the header's and View all's chevrons end in. */} +