Skip to content

feat(web): bring back the Agents sidebar panel alongside Lineage - #162

Merged
adampeterhiggins merged 1 commit into
t3code/sync-upstream-2026-10-05from
t3code/agents-sidebar-panel
Oct 5, 2026
Merged

adampeterhiggins merged 1 commit into
t3code/sync-upstream-2026-10-05from
t3code/agents-sidebar-panel

Conversation

@adampeterhiggins

Copy link
Copy Markdown
Owner

The orchestrator-v2 sync removed the fork's right-panel Agents surface. Upstream's v14 right-panel migration drops persisted agents tabs, and every subagent is now a child thread listed only under Lineage. #160 rebuilt the list UX and agent tabs inside Lineage, but the panel itself was gone: there was no fleet view beside the chat, no hover previews, and no view of agents that subagents start.

How

The Agents panel is a right-panel surface again on web and desktop. It sits next to Lineage and reuses #160's pieces instead of copying them.

  • One list logic. packages/client-runtime/src/state/agentFleet.ts (new, tested) builds the thread's whole fleet:
    • the thread's own subagent records
    • subagent child shells that have no record
    • agents spawned by those agents, recursively, found through lineage.parentThreadId in thread shells. Listing them never subscribes to another projection.
      It arranges the fleet as a tree under the shared view and adds a status/token summary. liveSubagent and edgeAgentStatus moved here from Lineage. agentListView.ts gains matchesAgentListView. Lineage and the panel both use these.
  • Shared filter and sort. Both surfaces read agentListViewStore, so search, status filter, and sort match when you switch between them. I chose this so the two views never disagree.
  • Panel (chat/AgentsPanel.tsx).
    • Rows show a status dot, title, tokens, and elapsed time. Working agents get a second line with their latest tool call (SubagentActivityLine, now shared with Lineage). Failed agents get their error instead.
    • Nested agents are indented under the agent that started them. When a filter hides an agent but matches one below it, the hidden agent stays as a dimmed context row.
    • Hover previews show the prompt, result or error, the five latest tool calls (ToolCallList), and usage.
    • Clicking a row or its preview opens feat(web): Agents drilldowns on upstream's child-thread subagents #160's agent tab. Right-click opens the agent menu.
    • The footer counts agents by status and adds up reported tokens.
    • Rows page in 50 at a time. A row reads its child thread only while it is a working row on screen or its preview is open. There are no animations.
  • Entry points.
    • The right-panel launcher row (shortcut A, badged with the number of working agents) and the + menu.
    • The command palette (Show agents).
    • A new button in the Lineage header; the panel has a Show in Lineage button to go back.
    • A Show all agents button in agent tabs.
    • View on the background-work banner when subagents are running.
    • Show in Agents panel in the agent right-click menu, which the timeline subagent rows and Lineage also use.
  • Restart. rightPanelStore is now v15. It keeps agents surfaces instead of dropping them. State persisted at the fork's v13 keeps its Agents tab. State the upstream v14 migration already rewrote has no Agents tab left to restore.
  • Nested agents everywhere. Agent tabs and the agent menu read a nested agent's record from the thread that spawned it. Continue in chat still forks the chat you are in.
  • Docs: rewrote "Agents panel drilldowns" in docs/fork-differences.md and "Inspect agent work" in docs/user/thread-sidebar.md.

Verification

  • npx vp test run src/state/agentFleet.test.ts src/state/agentListView.test.ts (client-runtime): 22 passed
  • npx vp test run src/components/chat/ThreadRelationshipsControl.agents.test.tsx src/components/chat/ThreadRelationshipsControl.test.tsx src/components/RightPanelTabs.test.tsx src/rightPanelStore.test.ts src/components/chat/ThreadDetailsPanel.test.tsx (web): 105 passed. This includes new store tests: the agents surface and agent tabs survive the migration, and opening the panel next to agent tabs.
  • npx tsc --noEmit in apps/web and packages/client-runtime: clean.
  • npx vp check --fix on the changed files: no new warnings. The ones that remain in ChatView.tsx and CommandPalette.tsx were already there.
  • I did not test in a running client (no dev server or browser).

Not restored

  • Workflow grouping (phases, collapsed run summaries, the script viewer): v2 has no workflow coordinator records, so the panel shows a flat tree.
  • In-panel detail view with Back: the detail now always opens as feat(web): Agents drilldowns on upstream's child-thread subagents #160's agent tab, which links back to the panel.
  • Provider transcript view (getSubagentTranscript, saved copies): v2 has no equivalent. The child thread holds the whole conversation.
  • Previews for nested agents: the prompt and result appear only after the spawning thread's projection loads. The preview loads it on open; the row itself shows status and timing from the shell.
  • Keybinding: the fork never had one, so none was added.
  • Mobile: unchanged; the fork had no Agents panel there.
  • feat(web): show where each subagent works in the Agents panel #77 (where each agent works): not included. It needs per-adapter cwd and isolation fields on the old v1 task events. On v2, the hover card already shows the child thread's folder and branch. Porting the shared/isolated tag would need adapter work first.

Done by Claude Opus 5.5 in Claude Code (via T3 Code).

🤖 Generated with Claude Code

The orchestrator-v2 sync removed the fork's right-panel Agents surface (upstream's
v14 store migration drops persisted "agents" tabs) and left subagents only in
thread-details Lineage. Restore the Agents panel as a right-panel surface over
v2 child threads, beside Lineage rather than instead of it:

- agentFleet.ts derives the thread's whole fleet, including agents spawned by
  agents (found through child-thread lineage in shells, no extra subscriptions),
  arranges it as a tree under the shared filter/sort, and summarises it.
- AgentsPanel.tsx: compact rows with the latest tool call or error, hover
  previews (prompt, outcome, latest tool calls, usage), click to open the
  agent tab, right-click agent menu, status/token footer, paging.
- Lineage and the panel share agentListViewStore; Lineage gets an
  "Open in Agents panel" button and the panel a "Show in Lineage" button.
- Entry points: launcher/+ menu (with live badge), command palette, agent
  tab, background-work banner, "Show in Agents panel" in the agent menu.
- rightPanelStore v15 keeps the agents surface across restarts.
- Agent tabs and the agent menu resolve a nested agent's record from the
  thread that spawned it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
adampeterhiggins added a commit that referenced this pull request Oct 5, 2026
…spect

feat(web): inspect a running agent in the sidebar (includes #162, Agents sidebar panel)
@adampeterhiggins
adampeterhiggins merged commit 417efc3 into t3code/sync-upstream-2026-10-05 Oct 5, 2026
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.

1 participant