Skip to content

agents view: move the subagent expand affordance onto the summary line - #2145

Merged
kevinjosethomas merged 11 commits into
mainfrom
res-1327-expand-arrow-summary-line
Sep 12, 2026
Merged

agents view: move the subagent expand affordance onto the summary line#2145
kevinjosethomas merged 11 commits into
mainfrom
res-1327-expand-arrow-summary-line

Conversation

@snimu

@snimu snimu commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

LOC

+51 / −50 across 3 files: agents-view-mode.ts (−12 net), agents-view-mode.test.ts, one changelog fragment. No new files, no new helpers.

Purpose

The expand/collapse affordance for a session's subagents was a small / glyph squeezed onto the session row, left of the name — easy to miss, and attached to the wrong element: the thing that expands is the subagent list, which already has its own summary line below ("2 subagents running"). Worse, when all subagents were finished and collapsed, that summary line did not render at all, so the only hint that anything was expandable was the tiny glyph.

Changes

  • The subagent summary row (already built by buildAgentsViewRows) now stays in the rendered row list instead of being folded away; it renders as ▸ 2 subagents running / ▾ … in the normal foreground and is the expand/collapse control.
  • The transient green "N subagents running" display item is gone — the summary row replaces it and also covers the all-finished case ("2 subagents").
  • Session rows no longer render any arrow; sessions without subagents never show one (unchanged, now guaranteed everywhere).
  • Keybindings are unchanged: the expand key (default alt+right) toggles from the parent row as before and now also from the summary row; Enter on the summary row toggles instead of opening the parent.

Validation

  • New pin: summary line carries the arrow + text in plain foreground, session rows carry no arrow, expand key and Enter toggle from the summary row, finished subagents keep a visible summary line. Fails on unfixed main (4 tests fail unfixed, all pass fixed).
  • agents-view suites + interactive rendering suites in a Prime sandbox; root npm run check (pre-commit) passes.

Fixes RES-1327


Note

Low Risk
UI and navigation changes in the agents view only, with no auth, data, or daemon protocol changes.

Overview
Subagent lists in the agents view now expose expand/collapse on the always-visible subagent summary row (/ plus count text) instead of a tiny arrow on the parent session row or a separate green “N subagents running” line.

Summary rows stay in the selectable row list ( compactSessionRows removed ); Enter and the expand key toggle the list when a summary row is focused, while session rows no longer show arrows. The hint tray reflects context (open vs expand/collapse, ← parent only when scoped), and selection restoration keeps a subagent-summary row selected across roster refreshes.

Tests and a changelog note cover the new UX; unrelated agent-trace test timer/outbox waits were tightened.

Reviewed by Cursor Bugbot for commit 9254a97. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Move subagent expand/collapse arrow onto the summary line in agents-view

  • Subagent summary rows are now retained as real selectable, rendered rows instead of being filtered out by the deleted compactSessionRows helper. They render an expand/collapse arrow (/) alongside their title.
  • The expand keybinding and openSelected now toggle the child list when a summary row is selected, and toggleSubagentList updates the parent session's expansion state.
  • Hint tray is context-sensitive: shows open, expand, or collapse depending on the selected row, and includes the parent hint only inside an agent scope.
  • Selection restoration preserves exact selectable-row identity (including summary rows) across rebuilds, and counts now derive from the current rows collection.
  • Behavioral Change: DisplayItem no longer has the running-subagents variant; the synthetic running-subagents status line is gone and replaced by the persistent summary row, which remains visible even when all children are idle.

Changes since #2145 opened

  • Increased maximum polling steps in test timer utility [1dc8dd4]
  • Added outbox synchronization logic to agent trace upload test [1dc8dd4]
  • Modified selection restoration in AgentsViewMode.restoreSelection to unconditionally delegate to resolveAgentsViewSelectionState and updated resolveAgentsViewSelectionIndex to derive synthetic kind from identity and preserve kind when matching by active session ID or session ID [9254a97]
  • Updated test case to verify subagent summary selection persistence across roster refreshes with changing identities [9254a97]

Macroscope summarized fa0a330.

Comment thread packages/coding-agent/src/modes/agents-view/agents-view-mode.ts
@sethkarten
sethkarten self-requested a review September 9, 2026 16:21
sethkarten
sethkarten previously approved these changes Sep 9, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/coding-agent/src/modes/agents-view/agents-view-mode.ts Outdated
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown

Prime Agent performance — failed

PR 9254a976 compared with main ca67580b.

Overall: 0 regressed · 0 improved · 2 no clear change · 15 unavailable.

Metric Main This PR Change
Cold startup
Warm startup
Installation 24.66 s 24.14 s ≈ -0.53 s (-2.13%)
Compressed release artifacts 11.17 MB 11.16 MB ≈ -0.01 MB (-0.12%)
Installed footprint
Idle memory, summed RSS

Python runtime

Metric Main This PR Change
Python kernel startup
Python cell round trip
Empty bash command
Bash git status
Bash 32 KiB output
35 cells / 9 shell calls
Python interrupt to done
Python state snapshot
Python state restore
Python idle RSS
Python RSS after pandas workload

Sandbox cost: ~$0.1949 — no inference calls.
Run, logs, and downloadable raw results

Methodology and samples

Main resolved at 2026-09-12T06:37:39.265540+00:00. Harness ca67580b.
Linux x64, 4 vCPU, 8 GB RAM, 20 GB disk; region us.
Image: node:24-bookworm@sha256:be23f54a88d34e8824c741b19b91064094f92c1c97b194144bfc8b50d67258e2.
Stock tools, skills, daemon, and Python bootstrap enabled; fresh homes and a fixed Git fixture.
Onboarding is dismissed; the editor starts without a selected model or submitted prompt.
Medians shown. Arrows require a 20% timing/memory change plus absolute floors and IQR.
These practical noise floors are not a statistical significance test.
Cold means stopped Prime processes; OS filesystem caches are not flushed.
No model requests or credentials. Installation excludes build/setup time.
Installer tarballs use loopback; npm/Python downloads use the network with fresh caches.
Artifact size counts release tarballs; footprint after first use includes registry packages.
MB is decimal. Summed RSS can double-count shared pages; PSS is recorded when available.
Provisioning, setup, and build durations are recorded separately in the raw results.
Kernel probes use the installed JSONL runtime, outside the TUI/TypeScript host.
Per trial: 50 Python cells, 5 calls per shell case, and one 35-cell mix (9 git status calls).
Cell/shell values are batch means; other runtime timings are single operations.
State fixture: a 10,000-row × 8-column integer DataFrame and a 10,000-integer list.
Restore runs in a fresh kernel, including pandas imports; kernel startup is excluded.
Kernel RSS covers the isolated Python process; loaded RSS follows the pandas workload.
Costs estimate full sandbox lifetimes at configured rates, including setup and build.
Budget target: $1; not a billing cap. Checks are informational.

Metric Main successful/attempted PR successful/attempted Main spread PR spread
Cold startup 0/7 0/8
Warm startup 0/7 0/7
Installation 3/3 3/3 range 0.86 s range 0.12 s
Compressed release artifacts 1/1 1/1
Installed footprint 0/0 0/0
Idle memory, summed RSS 0/0 0/0
Python kernel startup 0/0 0/0
Python cell round trip 0/0 0/0
Empty bash command 0/0 0/0
Bash git status 0/0 0/0
Bash 32 KiB output 0/0 0/0
35 cells / 9 shell calls 0/0 0/0
Python interrupt to done 0/0 0/0
Python state snapshot 0/0 0/0
Python state restore 0/0 0/0
Python idle RSS 0/0 0/0
Python RSS after pandas workload 0/0 0/0

Failures:

  • pr measure 3: RuntimeError
  • Benchmark exceeded its runtime limit
  • main cold trial 0: TimeoutError: Timed out waiting for the expected terminal state
  • main cold trial 1: TimeoutError: Timed out waiting for the expected terminal state
  • main cold trial 2: TimeoutError: Timed out waiting for the expected terminal state
  • main cold trial 3: TimeoutError: Timed out waiting for the expected terminal state
  • main cold trial 4: TimeoutError: Timed out waiting for the expected terminal state
  • main cold trial 5: TimeoutError: Timed out waiting for the expected terminal state
  • main cold trial 6: TimeoutError: Timed out waiting for the expected terminal state
  • main warm trial 0: TimeoutError: Timed out waiting for the expected terminal state
  • main warm trial 1: TimeoutError: Timed out waiting for the expected terminal state
  • main warm trial 2: TimeoutError: Timed out waiting for the expected terminal state
  • main warm trial 3: TimeoutError: Timed out waiting for the expected terminal state
  • main warm trial 4: TimeoutError: Timed out waiting for the expected terminal state
  • main warm trial 5: TimeoutError: Timed out waiting for the expected terminal state
  • main warm trial 6: TimeoutError: Timed out waiting for the expected terminal state
  • PR: CalledProcessError: Command '['/usr/sbin/runuser', '-u', 'benchmark1', '--', 'prime-agent', 'stop', '9e9ce68ed45b', '--json']' returned non-zero exit status 1.
  • PR cold trial 0: TimeoutError: Timed out waiting for the expected terminal state
  • PR cold trial 1: TimeoutError: Timed out waiting for the expected terminal state
  • PR cold trial 2: TimeoutError: Timed out waiting for the expected terminal state
  • PR cold trial 3: TimeoutError: Timed out waiting for the expected terminal state
  • PR cold trial 4: TimeoutError: Timed out waiting for the expected terminal state
  • PR cold trial 5: TimeoutError: Timed out waiting for the expected terminal state
  • PR cold trial 6: TimeoutError: Timed out waiting for the expected terminal state
  • PR cold trial 7: TimeoutError: Timed out waiting for the expected terminal state
  • PR warm trial 0: TimeoutError: Timed out waiting for the expected terminal state
  • PR warm trial 1: TimeoutError: Timed out waiting for the expected terminal state
  • PR warm trial 2: TimeoutError: Timed out waiting for the expected terminal state
  • PR warm trial 4: TimeoutError: Timed out waiting for the expected terminal state
  • PR warm trial 5: TimeoutError: Timed out waiting for the expected terminal state

@snimu
snimu requested a review from sethkarten September 11, 2026 08:23
@kevinjosethomas

Copy link
Copy Markdown
Member

can we make it so the option+right and option+left shortcuts are shown on the bottom tray (where the arrow is) since we're removing the ? for actions thing
file-750f0b6b92d8a1c9e24b3215883b5c02

The tray now names what the arrows do on the selected row: open, or
expand/collapse on a subagent summary line, plus a parent hint only
inside an agent scope. The ? actions hint is gone from the tray; the
overlay itself stays reachable.
@snimu
snimu force-pushed the res-1327-expand-arrow-summary-line branch from 975b23e to 3414dcf Compare September 11, 2026 19:01
Comment thread packages/coding-agent/src/modes/agents-view/agents-view-mode.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fa0a330. Configure here.

Comment thread packages/coding-agent/src/modes/agents-view/agents-view-mode.ts
@kevinjosethomas
kevinjosethomas merged commit 0badc0f into main Sep 12, 2026
22 checks passed
@kevinjosethomas
kevinjosethomas deleted the res-1327-expand-arrow-summary-line branch September 12, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants