Skip to content

feat(work-panel): show subagents as closable transcript tabs - #1027

Merged
vastsa merged 2 commits into
mainfrom
feat/subagent-work-panel-tabs
Sep 24, 2026
Merged

vastsa merged 2 commits into
mainfrom
feat/subagent-work-panel-tabs

Conversation

@Tioit-Wang

Copy link
Copy Markdown
Collaborator

What

Redesigns how subagent details are displayed in the work panel: the standalone dock overlay becomes a regular, closable work-panel tab (same mechanism as Review), and the tab content becomes a message-list style transcript with a read-only composer.

Why

Previously clicking a subagent node in the transcript replaced the entire work-panel tab strip with a single dock overlay ("independent side page"), so multiple subagents could not be viewed side by side and users had to reopen one subagent at a time (issue #917 feedback). The tab strip already supports many dynamic, reorderable, session-scoped tabs — subagents can simply be one more kind.

Behavior

  • Clicking a subagent topology node opens/activates a subagent tab (subagent:<delegationId>); re-clicking an already-open subagent activates its tab. No tab is auto-opened when a subagent starts.
  • N subagents = N coexisting tabs; all existing tab affordances apply (activate, drag-reorder, close via ×/middle-click/Del, wheel overflow, per-session persistence). Ended subagents' tabs stay open until manually closed.
  • Tab label: agent name captured at open time (e.g. explorer); duplicate names are disambiguated as explorer#2, explorer#3, …
  • Tab content is a message-stream reconstruction of the delegation: one turn per Task call in the resume chain —
    user: task prompt → delegate rows (tool rows, thinking, answer bubbles, markdown), matching the main MessageList visual language; follow-up prompts appear as additional user turns.
  • A disabled, 2-row composer sits at the bottom with an in-field hint that subagents are driven by the main agent and cannot take input. Display-only: no send path exists.
  • Removed: subagentPanel overlay state and actions, SubagentPanel/SubagentDetail dock surfaces, the panel takeover header/back button, and the transcript-search → subagent-panel focus handoff (the dock target no longer exists).

Notes

  • Display-only by design: follow-up input to a live delegate is not in scope (no renderer→delegate IPC exists; would need a separate protocol change).
  • Subagent tabs persist across session switches (per-session work-panel contexts) but, like all tabs, reset on app restart.

Tests

  • Unit tests for the new tab kind (factory, sanitize, open/activate/close/dedupe), the transcript timeline builder (single turn, resume chain, parallel delegates, empty task), and tab-label dedup.
  • Updated existing tests that referenced the removed overlay.
  • Targeted typecheck/lint/tests only — no exe/packaging build, per delivery constraints.

v_wyxgwang added 2 commits September 24, 2026 18:30
Clicking a delegation topology node replaced the whole work-panel tab
strip with a single dock overlay, so parallel subagents could not be
viewed side by side and every ended detail had to be reopened one at a
time. Give subagents a first-class tab kind instead: each delegation
opens (or activates) a normal closable tab keyed by its delegation id,
so N subagents yield N coexisting tabs with the standard activate,
reorder, close, and per-session persistence affordances. No tab opens
automatically; ended delegates' tabs stay until closed.

The tab renders the delegation as a conversation instead of a summary
card: every Task call of the resume chain shows its prompt as a user
row and the delegate's thinking, tool, and answer rows beneath it, reusing
the main transcript's message-list language, so follow-up prompts read
as the next user turn. A disabled two-row composer with an in-field
read-only hint closes the tab; display-only by design, since the runtime
has no renderer-to-delegate send path.

Removes the subagentPanel overlay state, the dock takeover header, and
SubagentPanel/SubagentDetail; delegation chain maps are now shared by
the topology grouping and the new transcript builder. Specs and E2E
plan updated (E2E-248); source-contract tests migrated to the tab model.
@vastsa
vastsa merged commit 62afc74 into main Sep 24, 2026
3 of 4 checks passed
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