Skip to content

feat(coding-agent): render the subagents summary as a bordered tile - #1586

Open
snimu wants to merge 5 commits into
mainfrom
feat/subagent-summary-tile
Open

feat(coding-agent): render the subagents summary as a bordered tile#1586
snimu wants to merge 5 commits into
mainfrom
feat/subagent-summary-tile

Conversation

@snimu

@snimu snimu commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

The subagents entry under the prompt was a single dim line — easy to miss entirely. This renders it as a small bordered tile instead.

Before

  5 subagents: 0 running · 0 idle · 5 inactive  Enter or → to open

After

image
  • Bold accent agents label in the top border makes it read as a tile, not a list item.
  • Counts are color-coded with fixed colors (● running = success, ◐ idle = warning, ○ inactive = dim) — no conditionality on values, per design review.
  • Open hint right-aligned inside the border; only shown when the daemon-backed view is openable (existing behavior).
  • Focus keeps the existing selected-background treatment on the content line; hidden entirely at 0 subagents (existing behavior).
  • Location/context info line above is unchanged.

Design exploration: several tile/roster/card prototypes were mocked; this is the chosen minimal variant.

Validation

  • tsgo + biome green; subagent-summary-line + interactive-heartbeat-management suites updated and green.

Fixes ENG-5405 (https://linear.app/primeintellect/issue/ENG-5405)


Note

Low Risk
TUI-only presentation change in the subagent summary; no auth, data, or interaction-model changes beyond extra render height.

Overview
Makes the subagents entry under the prompt easier to spot by replacing the single dim line with a three-line bordered agents tile.

When there are subagents, SubagentSummaryLine.render now draws a box with a bold accent label, color-coded running/idle/inactive counts, and a right-aligned hint (↓ select unfocused, confirm/open when focused). Hidden at zero children, as before. Focus still uses the selected background, re-applied across truncation ANSI resets so highlighting does not drop. Layout is clamped to the allocated width.

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

Note

Render SubagentSummaryLine as a bordered 'agents' tile with color-coded counts

  • Replaces the single-line summary in SubagentSummaryLine.render with a three-line bordered tile showing running (●), idle (◐), and inactive (○) counts, plus a right-aligned open hint.
  • Returns early when total subagents is 0 or terminal width < 2, and truncates content to fit the inner width.
  • Re-applies the selection background across ANSI reset sequences introduced by truncation so focus highlighting persists.
  • Updates tests in subagent-summary-line.test.ts to expect the tile format, width constraints, and background continuity.
  • Behavioral Change: render now outputs three lines instead of one when subagents are present, which changes the height of the interactive mode status area.

Changes since #1586 opened

  • Modified hint rendering logic in SubagentSummaryLine.render component within coding-agent package to conditionally display hints based on focus state [ef9c58e]

Macroscope summarized d290408.

The one-line dim summary under the prompt was easy to miss. Render it
as a 3-row tile: an accent "agents" label in the top border, then one
content line with color-coded counts (green running, yellow idle, dim
inactive) and a right-aligned Enter/right-arrow open hint. Colors are
fixed regardless of counts; focus keeps the selected-background
treatment on the content line.

@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.

Reviewed by Cursor Bugbot for commit 6d1adac. Configure here.

Comment thread packages/coding-agent/src/modes/interactive/components/subagent-summary-line.ts Outdated
snimu added 2 commits August 20, 2026 19:26
Review caught that render() clamped to Math.max(24, width), emitting
24-column border lines into narrower viewports — the TUI treats any
overflowing line as fatal. The tile now uses the allocated width as-is,
truncates the top border, and skips rendering below two columns.
Regression test asserts no line exceeds widths down to 1.
Comment thread packages/coding-agent/src/modes/interactive/components/subagent-summary-line.ts Outdated
Review caught that a focused, truncated tile lost selectedBg after the
ellipsis: truncateToWidth injects a full ANSI reset behind the colored
counts, clearing the outer background for the rest of the line. Reapply
the background per reset-delimited segment, following the
custom-editor/side-question precedent. Regression test asserts every
reset inside the focused content line is followed by a background SGR.
@sethkarten
sethkarten self-requested a review August 20, 2026 19:01
sethkarten
sethkarten previously approved these changes Aug 20, 2026
Unfocused the tile now shows "↓ select" (down-arrow at end of input
moves focus to it); once focused it shows the existing "Enter/→ open".
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.

2 participants