Skip to content

cmux NEXT tray: a subagent line's time and state sit beside its chevron - #31743

Merged
cmux-bot[bot] merged 10 commits into
feat-cmux-nextfrom
feat-cmux-next-31492-subagent-row-align
Nov 2, 2026
Merged

cmux-bot[bot] merged 10 commits into
feat-cmux-nextfrom
feat-cmux-next-31492-subagent-row-align

Conversation

@austinywang

@austinywang austinywang commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #31492

What

In the subagent tray above the composer, a finished line such as "Correctness review PR 30008 · 8m 56s Done ›" showed its time and state floating in the middle of the row instead of next to the chevron.

Each tray line is a grid: title | time (80px) | status (74px) | Stop (28px) | chevron. On a line without a Stop button (a finished, failed or cancelled subagent, or a chat line), the Stop track stayed empty. The state word also sat left-aligned in its fixed track. Together that left about 36px between the state word and the chevron.

Now the time and the state word are one cluster at the line's end:

  • A line without Stop gives the cluster Stop's empty track, so "8m 56s Done" ends one tray gap from the chevron.
  • A line with Stop (a running subagent or command) ends the cluster one gap before Stop.
  • Stop and the chevron keep their fixed columns, so they still line up with the composer's Stop and mic.
  • The time keeps its fixed 80px right-aligned box, so a ticking duration never moves the state word. A long state word, such as a retry label, gets the ellipsis before the time does.
  • Narrow trays (≤400px) lay the cluster on the controls row and let it use the title's free track.

Tradeoff, on purpose: the time no longer sits on one x across every line, because the cluster follows each line's state word and Stop. The issue asks for the time and state beside the chevron, and with Stop in its own column that can't also hold. The two geometry tests that pinned the old shared columns now pin the new contract.

Tests

The regression test is the first commit, d9ca3f7. Commands ran locally in headless Chromium (CMUX_BROWSER_TESTS=1) from webviews/.

  • bun test test/subagent-tray-columns.test.ts
    • At the base: the new "state ends beside its next control" check fails, Expected: <= 8, Received: 36, on both themes. Its other 16 tests pass.
    • At the head: 18/18 pass.
  • bun test test/subagent-tray-composer-geometry.test.ts
    • At the base: fails at 760, 300 and 200 px. Gaps are unequal: Received: 32 against the 0.5px tolerance.
    • At the head: passes.
  • bun test test/subagent-tray-composer-geometry.test.ts test/subagent-tray-trailing.test.ts test/subagent-tray-columns.test.ts: at the head 41b5d12, 25/25 pass.
  • bun test test/agent-pane-workflow-progress.test.tsx test/subagent-tray.test.tsx (jsdom): 52/52 pass.
  • scripts/web-lint.sh: passes. The prepush gate reports no new violations.

Observed / Not run

  • Observed: the runs above on this Mac, at the commits named. The first two base runs of the columns test failed in setup from local Vite cold-start errors (dependency optimizer, dynamic import), not on an assertion. The third base run produced the red result above.
  • Not run: the receipts tool, Freestyle and cmux-ci run. None of them is reachable from this Mac, so the browser tests ran locally instead.
  • Not run: a native app capture. This is a webview change, so its visuals come from the PR's gallery advisory run. The agent-pane.subagent-tray entry's geometry and duration-columns states show it.

Review

A correctness review subagent found nothing blocking. Its four smaller findings are fixed in 41b5d12:

  1. The trailing test's time-before-Stop check could fail on a line without Stop that shows a short state word. It now applies only to lines with Stop.
  2. A time-column equality held only because of the fixture's state words. Dropped.
  3. The cluster gap is tied to --acpmux-tray-gap, the grid's own gap token.
  4. The inline look keeps its auto-width, left-aligned time.

Changelog

  • Fixed: In the subagent tray, a line's duration and state now sit next to its chevron instead of floating mid-row.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the subagent tray so a finished line's duration and state (e.g. "8m 56s Done") sit right beside its chevron instead of floating mid-row.

  • Time and state form one right-aligned cluster at the line's end: beside Stop on running lines, beside the chevron on finished ones.
  • The time keeps its fixed-width box, so a ticking duration never moves the state word; a long state word gives way first.
  • Stop and the chevron keep their fixed columns, so the tray stays aligned with the composer's mic and Stop. On narrow trays the cluster moves to the controls row.
  • Tradeoff: the time no longer shares one x across every line, since the cluster follows each line's Stop.

Two geometry tests that pinned the old shared columns now pin the new contract. A review follow-up ties the cluster gap to the tray's own gap token and scopes the trailing test's time-before-Stop check to lines with Stop.

Written for commit 8c392ee. Summary will update on new commits.

View guided diff Turn on auto-fix

austinywang and others added 4 commits November 1, 2026 18:55
…op (cmux#31492)

Fails on the base: a finished line's state word ends a Stop track and the status
track's slack away from the chevron.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…evron (cmux#31492)

The tray line's time and state word were two fixed tracks with Stop's track
after them, so on a line with no Stop (a finished subagent) "8m 56s Done" floated
mid-row. They are now one cluster set against the line's end: beside the chevron,
taking Stop's empty track, or beside Stop on a line that has one. The time keeps
its fixed right-aligned box, so a tick never moves the word; Stop and the chevron
keep their columns, aligned with the composer's controls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tie the cluster gap to the tray's own gap token, keep the inline look's
auto-width left-aligned time, scope the trailing test's time-before-Stop check
to lines with Stop, and drop a time-column equality the fixture only met by
chance. Formats the composer geometry test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@austinywang austinywang added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 41b5d12: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr31743 -f ref=feat-cmux-next-31492-subagent-row-align -f platform=macos -f backend_mode=local

Gallery before/after for 554f13a: 16 states rendered, 10 images differ, 1236 more touched states not rendered. Images are in the run's artifact, not on this public PR; the independent review of this head reads them on its own, so the PR needs no hand-made screenshots of these states.

gh run download 41448723825 -R manaflow-ai/cmux -n gallery-advisory-31743-554f13a0480ccdd299a1dc4b323d1f2de0326151 (then read gallery-review.json)

States
State Theme Status Diff Picked by
agent-pane.background-activity/duration-columns Apple System Colors Light unchanged 0% own subagents.css
agent-pane.background-activity/duration-columns Apple System Colors unchanged 0% own subagents.css
agent-pane.background-activity/pinned-live-tail-light Apple System Colors Light unchanged 0% own subagents.css
agent-pane.background-activity/pinned-live-tail-light Apple System Colors unchanged 0% own subagents.css
agent-pane.background-activity/pinned-live-tail-dark Apple System Colors Light unchanged 0% own subagents.css
agent-pane.background-activity/pinned-live-tail-dark Apple System Colors unchanged 0% own subagents.css
agent-pane.background-activity/after-latest-message-light Apple System Colors Light unchanged 0% own subagents.css
agent-pane.background-activity/after-latest-message-light Apple System Colors unchanged 0% own subagents.css
agent-pane.background-activity/after-latest-message-dark Apple System Colors Light unchanged 0% own subagents.css
agent-pane.background-activity/after-latest-message-dark Apple System Colors unchanged 0% own subagents.css
agent-pane.background-activity/compact-pill-light Apple System Colors Light unchanged 0% own subagents.css
agent-pane.background-activity/compact-pill-light Apple System Colors unchanged 0% own subagents.css
agent-pane.background-activity/compact-pill-dark Apple System Colors Light unchanged 0% own subagents.css
agent-pane.background-activity/compact-pill-dark Apple System Colors unchanged 0% own subagents.css
agent-pane.background-activity/side-panel-light Apple System Colors Light unchanged 0% own subagents.css
agent-pane.background-activity/side-panel-light Apple System Colors unchanged 0% own subagents.css
agent-pane.chat-inspector/full Apple System Colors Light unchanged 0% own AgentLine.tsx
agent-pane.chat-inspector/full Apple System Colors unchanged 0% own AgentLine.tsx
agent-pane.chat-inspector/workflow-running Apple System Colors Light changed 0.0047% own AgentLine.tsx
agent-pane.chat-inspector/workflow-running Apple System Colors changed 0.001% own AgentLine.tsx
agent-pane.chat-inspector/workflow-finished Apple System Colors Light unchanged 0% own AgentLine.tsx
agent-pane.chat-inspector/workflow-finished Apple System Colors unchanged 0% own AgentLine.tsx
agent-pane.chat-inspector/workflow-agent-failed Apple System Colors Light unchanged 0% own AgentLine.tsx
agent-pane.chat-inspector/workflow-agent-failed Apple System Colors unchanged 0% own AgentLine.tsx
agent-pane.chat-inspector/workflow-agent-row-compact Apple System Colors Light changed 0.0063% own AgentLine.tsx
agent-pane.chat-inspector/workflow-agent-row-compact Apple System Colors changed 0.0057% own AgentLine.tsx
agent-pane.chat-inspector/workflow-agent-row-detail Apple System Colors Light changed 0.0063% own AgentLine.tsx
agent-pane.chat-inspector/workflow-agent-row-detail Apple System Colors changed 0.0053% own AgentLine.tsx
agent-pane.chat-inspector/workflow-agent-row-grid Apple System Colors Light changed 0.0065% own AgentLine.tsx
agent-pane.chat-inspector/workflow-agent-row-grid Apple System Colors changed 0.0053% own AgentLine.tsx
agent-pane.chat-inspector/workflow-agent-row-narrow Apple System Colors Light changed 0.0067% own AgentLine.tsx
agent-pane.chat-inspector/workflow-agent-row-narrow Apple System Colors changed 0.0055% own AgentLine.tsx

Pick other states with a Gallery: entry.id, entry.id/variant line in the PR body.

Passes: CI passes on 554f13a048.

CI passes on 554f13a048 (run 41448724042 attempt 1).

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

web and size checks: green

Shipped in:

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/41454213833 at 986d466 failed: cmux-next checks (god files, concurrency, crash safety, l10n).
Those jobs last passed at f21d85e. This pull request is one of 5 merged since: #32305, #32312, #32182, #32265, #31743.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@austinywang

Copy link
Copy Markdown
Contributor Author

Correctness review (review subagent) at 4e767cb: nothing blocking.

What it checked and found sound:

  • The narrow-container (≤400px) overrides win over the base :has() rules: same specificity, later in the file.
  • The empty-Stop :empty check is reliable. Stop buttons never render null, and the stop slot is always a direct child of the line.
  • The time is never clipped, and long retry labels get an ellipsis.
  • An empty slot still passes a click to the line.
  • The base tests' structural assumptions still hold.
  • The new checks fail on the base.

Findings and resolution, all fixed in 41b5d12:

  1. (medium) The trailing test's slot.left >= time.right check would fail on a line without Stop that shows a short state word. It now applies only to lines with Stop, and the out-of-date comment is fixed.
  2. (medium) A new "lines with Stop share their time column" equality held only because the fixture's Stop lines all say Running. Dropped, since the Stop column check already covers it. The time column following the state word is the intended tradeoff, noted in the description.
  3. (low) The cluster gap used --ds-space-1 while the grid uses --acpmux-tray-gap. The cluster now uses --acpmux-tray-gap.
  4. (low) The inline look lost its auto-width, left-aligned time. Restored.

Rerun at 41b5d12: the 3 tray browser test files (25/25), 2 jsdom files (52/52) and scripts/web-lint.sh all pass.

@blacksmith-sh

blacksmith-sh Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Found 6 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmplc4bysew/summary-missing.json (live):/summary-missing.json (live): View Logs
/tmp/tmpznfdlo4i/summary-fail.json (live):/summary-fail.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator

Review (codex gpt-6.1-sol xhigh, next-review): SHIP at fe8fac8

SHIP at fe8fac8
Visual verdict: reviewed all 16 pairs; differences are spinner frames. The changed tray rows are not pictured.

No correctness regressions found. Tests could not run because Bun is unavailable.

  1. [P2] [follow-up] AgentLine.tsx:188: Supply before/after captures of expanded tray rows at wide and narrow widths; the retained duration screenshot shows only the collapsed header.

Follow-ups:

  • Add screenshots covering the changed tray cluster (finding 1).

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 05:57 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 05:58 Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator

Review (next-review patch-id; carried): SHIP at 73b42f5

The independent SHIP at fe8fac8 carries to this head: the PR's own change (git diff $(git merge-base feat-cmux-next HEAD) HEAD) has the same git patch-id --verbatim (9ce55c36b40320b7) at both heads, and no merge between them was resolved by hand. Nothing new to review. A newer BLOCK, or any change to the PR's own diff, ends the carry.

@teamleaderleo

Copy link
Copy Markdown
Collaborator

Review (next-review patch-id; carried): SHIP at 656aa44

The independent SHIP at fe8fac8 carries to this head: the PR's own change (git diff $(git merge-base feat-cmux-next HEAD) HEAD) has the same git patch-id --verbatim (9ce55c36b40320b7) at both heads, and no merge between them was resolved by hand. Nothing new to review. A newer BLOCK, or any change to the PR's own diff, ends the carry.

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 08:44 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 08:44 Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator

Review (next-review patch-id; carried): SHIP at efb27b2

The independent SHIP at fe8fac8 carries to this head: the PR's own change (git diff $(git merge-base feat-cmux-next HEAD) HEAD) has the same git patch-id --verbatim (9ce55c36b40320b7) at both heads, and no merge between them was resolved by hand. Nothing new to review. A newer BLOCK, or any change to the PR's own diff, ends the carry.

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 10:50 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 10:50 Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator

Review (next-review patch-id; carried): SHIP at 8c392ee

The independent SHIP at fe8fac8 carries to this head: the PR's own change (git diff $(git merge-base feat-cmux-next HEAD) HEAD) has the same git patch-id --verbatim (9ce55c36b40320b7) at both heads, and no merge between them was resolved by hand. Nothing new to review. A newer BLOCK, or any change to the PR's own diff, ends the carry.

@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 12:56 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent November 2, 2026 12:56 Inactive
@teamleaderleo

Copy link
Copy Markdown
Collaborator

Review (next-review patch-id; carried): SHIP at 554f13a

The independent SHIP at fe8fac8 carries to this head: the PR's own change (git diff $(git merge-base feat-cmux-next HEAD) HEAD) has the same git patch-id --verbatim (9ce55c36b40320b7) at both heads, and no merge between them was resolved by hand. Nothing new to review. A newer BLOCK, or any change to the PR's own diff, ends the carry.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 554f13a0 Deployed Nov 2, 2026 by cmux-bot[bot] via wait for same-key tree publisher #101308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants