Skip to content

Agent pane: an opened subagent's "Subagent of" pill gets a close button; Escape closes it - #34329

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
leo/subagent-view-close
Nov 3, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
leo/subagent-view-close

Conversation

@teamleaderleo

Copy link
Copy Markdown
Collaborator

Leo: "this opened subagent has no close button".

An opened subagent showed a centred "Subagent of · " pill and nothing else to dismiss it.

Change

  • The pill now ends in a × (action.close, 18px button, 12px glyph). It matches the close button on the summary card's Subagents tab. The hover highlight covers only the ×, not the pill.
  • The × closes the subagent's view and returns to the chat. Clicking the pill's text still goes back to the parent (the parent subagent's view, else the chat's), as before.
  • Escape closes the view too, when no other control has it. A text field, a modifier key, an open menu, popover or dialog, or a handler that already claimed the key all leave the view open. While a turn runs, that press closes the view and doesn't arm the stop double-press (subagents/subagentEscape.ts).
  • New string subagents.close ("Close subagent"), translated into all 21 languages.

Prior art: none of these adds a close control, so I acknowledged them all: #29885, #28696, #29794, #29608, #27575, #28537, #28133, #24093, #22643, #33280, #27930, #25201. #24093 set the pill's <chat> · <task> text, which this keeps. The open ones (#33280, #27930, #25201) touch other parts of these files.

Gallery: subagents entry, variants child-close-hover, child-close and child-escape.

Test: webviews/test/subagent-of-close.test.tsx covers the × going to the chat, the pill text going to the parent, the Escape filter, and the hook claiming the key.

Risk: small and limited to one component. The existing .cv-subagent-of__pill selectors used by tests and gallery steps still point at the back button.

Agent session: agent session

🤖 Generated with Claude Code

…on; Escape closes it too

Leo: "this opened subagent has no close button".

The pill's × (action.close, 18px, 12px glyph, hover on the × alone, as the
summary card's Subagents tab close) returns to the chat's view. Escape that
no field, menu or popover took does the same. Clicking the pill's text still
goes back to the parent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@teamleaderleo teamleaderleo added the leo-named-fix An obvious fix to something Leo named: lands on push, review runs in parallel label Nov 3, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 3, 2026
…t-view-close

# Conflicts:
#	webviews/src/agent-session/acpmux/subagents/subagents.css
@teamleaderleo
teamleaderleo merged commit ba73b97 into feat-cmux-next Nov 3, 2026
12 checks passed
@teamleaderleo
teamleaderleo deleted the leo/subagent-view-close branch November 3, 2026 23:19
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude opus-5.5 medium): SHIP at dd711d0

Visual verdict: no images (code verdict only)

What I checked: the × goes to the chat, the pill text goes to the parent, and the hover highlight covers only the ×. Ellipsis truncation and the 44px row still hold. The Escape ordering works with the composer, the double-press stop, the transcript selection and open menus. The xcstrings file is valid with all 21 locales, and no test or gallery depends on the pill's old DOM.

Follow-ups (fixed forward):

  • Escape with focus in Session Info can close the subagent view instead of Session Info, depending on which listener was registered first.
  • The hook call in App.tsx sits in the middle of the comment for the tab-title effect.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Review dd711d0: 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=pr34329 -f ref=leo/subagent-view-close -f platform=macos -f backend_mode=local

Gallery before/after for dd711d0: 16 states rendered, 0 images differ, 2018 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 41738379319 -R manaflow-ai/cmux -n gallery-advisory-34329-dd711d0259759c8513d2daf7e7ce8c8a490dea4d (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-width/standard Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/standard Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide Apple System Colors unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors Light unchanged 0% own App.tsx
agent-pane.chat-width/wide-blocks Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/short-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/wide-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-edge/no-edge Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/scrolled-to-end Apple System Colors unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors Light unchanged 0% own App.tsx
agent-pane.composer-floats/composer-grown Apple System Colors unchanged 0% own App.tsx

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

Unclear: web / react-apps-check failed: no known signature; failed step: Check webview test shards. This PR merged before its CI finished: fix forward on main.

CI failed on dd711d0259 (run 41738379605 attempt 1): 1 code, 1 unknown.

Job Verdict Why
web / react-apps-check (1) code a web test failed
web / react-apps-check unknown no known signature; failed step: Check webview test shards

Failures:

  • seen on other PRs render.test.tsx no rule declares a background other than transparent or the two interaction tokens: failed (job)
  • seen on other PRs agent-pane-adopted-edited-files.test.ts the edited-files card lists each file with its counts, and View changes opens the hunks: failed (job)
  • seen on other PRs agent-pane-edited-calm.test.ts the diff: a regular file header, plain-text badges, terminal-sized code lines: failed (job)
  • seen on other PRs trailing-plates-diff.test.ts (unnamed): failed (job)
Matched log lines
web / react-apps-check (1): (fail) no rule declares a background other than transparent or the two interaction tokens [1.19ms]

Not re-run automatically: web / react-apps-check (1), web / react-apps-check are not machine failures.

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.

red: cmux-next checks (god files, concurrency, crash safety, l10n); base red: the same failure on the base cf0fdde; does not block
red: web / Web status; a job it gathers is red on this change (its line here); do not merge until green; see lane-rules
red: web / react-apps-check; a job it gathers is red on this change (its line here); do not merge until green; see lane-rules
red: web / react-apps-check (1); no finished base run on cf0fdde to compare; do not merge until green; see lane-rules

Shipped in:

teamleaderleo added a commit that referenced this pull request Nov 3, 2026
…sits above the tab-title comment (#34339)

Follow-ups from the review of #34329: with focus in Session Info or on its
toggle, Escape closes Session Info, never the subagent's view, whichever
listener was added first. The hook call moves out of the middle of the
comment that explains the tab-title effect.


Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
lawrencecchen added a commit that referenced this pull request Nov 4, 2026
…ens) (#34397)

check:design-tokens is red on feat since ba73b97 (#34329): the new
close button used width/height 18px and a 2px margin, which are not on the
token scale. It now uses --ds-control-icon (20px) and the spacing scale.
The look moves by 2px; the pill (28px) still holds it.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — dd711d02 Deployed Nov 3, 2026 by teamleaderleo via wait for same-key tree publisher #107982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

leo-named-fix An obvious fix to something Leo named: lands on push, review runs in parallel risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant