Skip to content

feat(web): surface orchestration agents in the timeline - #4664

Closed
shivamhwp wants to merge 357 commits into
t3code/codex-turn-mappingfrom
subagent-obs/05-thread-visibility
Closed

shivamhwp wants to merge 357 commits into
t3code/codex-turn-mappingfrom
subagent-obs/05-thread-visibility

Conversation

@shivamhwp

@shivamhwp shivamhwp commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

Orchestrator V2 already projects native subagents, and the existing Agents panel already owns their live detail. The remaining problem is presentation: chat repeats one lifecycle row per agent, duplicating the roster and stretching the turn.

This PR keeps the existing orchestration semantics and:

  • collapses only local subagents from the same run into one compact timeline action;
  • derives the visible count and aggregate state from existing projected item statuses;
  • keeps partial failures visible and destructive while sibling agents are still working;
  • opens the existing Agents panel for names, status, duration, output, and hierarchy;
  • preserves inherited fork projections as lifecycle rows so they keep their source-thread context;
  • keeps superseded and replacement attempts in separate summary rosters;
  • isolates changing agent summaries from unrelated virtualized timeline rows.

There are no server, contract, persistence, provider-adapter, recovery, client-runtime, or mobile behavior changes.

Screenshots

Before · individual agent rows After · summaries and Agents panel
Isolated UI fixture using the existing individual-row fallback PR 4664 at 8513f93ad: grouped summaries and the existing Agents panel
Narrow timeline Narrow Agents panel
Grouped agent statuses at a 390-pixel browser width Existing Agents panel at a 390-pixel browser width

Verification

  • 169 focused timeline tests pass across two files.
  • Web typecheck passes.
  • The changed timeline files pass formatting, lint, and whitespace checks.
  • Render coverage confirms local agents collapse to one summary row while inherited rows and separate attempts remain independent.
  • The summary exposes working, idle, failed, stopped, and completed states and opens the existing Agents panel.

Built and tested with GPT-5.6-Sol in the Codex harness through T3 Code.


Note

Low Risk
UI-only timeline presentation and row derivation; no auth, API, or persistence changes, with a safe fallback when the Agents opener is omitted.

Overview
Local subagent events in the chat timeline are collapsed into one summary row per run (or per attempt / orphan item) instead of repeating a lifecycle card for every agent, while inherited fork projections still render as normal event rows.

deriveMessagesTimelineRows gains optional summarizeSubagents and builds agent-spawn rows with aggregate working, idle, failed, and stopped counts; non-representative entries in a group are dropped from the list. Summarization turns on only when MessagesTimeline receives onOpenAgents—ChatView wires that to the existing Agents panel opener.

The new AgentSpawnCtaRow is a single clickable control (“Kicked off N agents…”, failure styling when needed, Open Agents / View) so roster detail stays in the Agents panel. Without onOpenAgents, behavior stays the old per-event rows. Stable row comparison and tests cover grouping, idle vs completed, superseded attempts, and cache refresh when agent status changes.

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

Note

Add grouped agent-spawn summary rows to MessagesTimeline timeline

  • ChatView passes its existing Agents-surface opener to MessagesTimeline via a new optional callback prop, enabling subagent summarization only when the callback is present
  • deriveAgentSpawnSummaries in MessagesTimeline.logic.ts aggregates local subagent events into per-run, per-attempt, or per-item groups, suppressing later entries in each group and exposing working, idle, failed, and stopped counts
  • The new AgentSpawnCtaRow component renders each summary as a clickable control showing total and status counts; active groups offer "Open Agents" and settled groups offer "View", with destructive styling for failures
  • Inherited entries, non-subagent events, and entries without a summary remain ordinary event rows
  • Behavioral Change: MessagesTimeline now displays grouped summary rows instead of individual local subagent events when the Agents opener is provided; without it, rendering is unchanged. The new agent-spawn variant in MessagesTimelineRow must be handled by any consumer of that union

Macroscope summarized 62d1993.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 606ccf48-8344-45dd-ab00-72d4e58d33f9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch subagent-obs/05-thread-visibility

Warning

Your free Security trial is over. An organization admin can upgrade to Advanced for continuous pull request security review or dismiss this notice.


Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 27, 2026
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from 940e8fb to c3a50f8 Compare July 27, 2026 20:20
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from d2ef6c7 to adb1e9b Compare July 27, 2026 20:20
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from c3a50f8 to 8c6a796 Compare July 27, 2026 20:52
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from adb1e9b to 39912b0 Compare July 27, 2026 20:52
Comment thread apps/web/src/components/chat/ThreadRelationshipsControl.tsx
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from 8c6a796 to 103b937 Compare July 27, 2026 23:03
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from 39912b0 to 6bc3a8d Compare July 27, 2026 23:03
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from 103b937 to 31adb36 Compare July 28, 2026 15:31
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from 6bc3a8d to 05fe44c Compare July 28, 2026 15:31
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from 31adb36 to b270c47 Compare July 28, 2026 19:27
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from 05fe44c to 7458298 Compare July 28, 2026 19:27
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from b270c47 to daf1a88 Compare July 28, 2026 19:46
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from 7458298 to 4daeac4 Compare July 28, 2026 19:46
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from daf1a88 to 1dce464 Compare July 28, 2026 20:26
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from 4daeac4 to 095cab7 Compare July 28, 2026 20:26
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from 1dce464 to 4c169ed Compare July 29, 2026 01:19
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from 095cab7 to 1d37a6f Compare July 29, 2026 01:19
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from 4c169ed to 70d5111 Compare July 29, 2026 01:24
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from 1d37a6f to 6cf67a2 Compare July 29, 2026 01:25
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from 70d5111 to c78d0ff Compare July 30, 2026 00:00
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from 6cf67a2 to 5e3c535 Compare July 30, 2026 00:00
@shivamhwp
shivamhwp force-pushed the subagent-obs/04-agents-panel branch from c78d0ff to a997806 Compare July 30, 2026 00:45
@shivamhwp
shivamhwp force-pushed the subagent-obs/05-thread-visibility branch from 5e3c535 to 2430736 Compare July 30, 2026 00:45
@shivamhwp
shivamhwp marked this pull request as ready for review July 30, 2026 20:04
Comment thread apps/web/src/state/entities.ts Outdated
juliusmarminge and others added 28 commits September 4, 2026 21:54
The branch had drifted from main's composer and work-log design in ways
unrelated to orchestration v2: a pre-revert "Working for" shoulder tab
on the composer (main reverted #8693 and re-landed #8734 without it),
an inline stash variant plus in-flow stash menu, expanded tool rows that
hid their icons, an unmounted woke-thread banner, a composer scroll
observer main never had, and a right-panel toggle that lost its
showRightPanelControl gate so it rendered twice with the panel open.

ChatComposer and its satellites now start from main's files with only
the v2 delta re-applied (dispatch modes, queued-message editing, runtime
request ids, response capability). Background tasks surface as a
ChatView banner in main's backgroundLiveness shape instead of a
composer tab. SimpleWorkEntryRow takes main's PlainWorkEntryRow body
with the V2ItemInspector kept behind the expander.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Renumbers the v2 migrations 044-052 to 045-053 behind main's
044_ClearAutomaticProjectModelDefaults, and adopts main's sticky
new-thread selection (#9164), local-only worktree bases in the v2 launch
path (#8751), the PR summary read for settlement (#9176), Claude per-cwd
skills (#9210), the provider editor redesign with the branch's dedicated
environment fields re-grafted (#8508), and the client half of
continue-threads-across-restart (#9167). The server-side continuation
markers stay unported: they live in the v1 session directory, and v2
recovery terminalizes running runs on restart, so the capability is
withheld until the v2 runtime carries them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Index event sequence lookups, recover only threads with pending work, and page projection verification and rebuilds. Bound provider event logging and omit turn histories when resuming Codex threads.

Allow delegated thread identifiers through relay routes. Add focused regression coverage and document the performance constraints.
Retain main's composer, work-log, settings, mobile and performance changes through c8f77e0 while preserving v2 runs, queued messages, provider handoffs and durable history.

Port native compaction and logout, asynchronous Codex questions, provider usage accounting, automatic settlement and PR refresh into the v2 services. Bound live event retention during replay and delivery, measure thread replay before decoding, and read checkpoint metadata without loading transcripts or patches.

Keep main migrations through 047 and move the v2 migrations to 048–058. Preserve the existing branch history and the pre-rebase backup.

Model: GPT-6. Harness: Codex.
- Preserve Codex turn identity while suppressing duplicate diff notifications
- Optimize settlement projections and isolate thread visit handling
- Add concurrency and regression coverage across server and mobile
Restore the completed work timer divider and text size from main. Keep todo-list progress in the composer and omit it from web and mobile timeline entries, including completed task lists.

Verified pending, running, and completed task projection; 187 focused web tests and 35 mobile tests pass. Web and mobile typechecks pass.
Show Send when a running thread has draft content. Separate submission follow
from first-message anchoring so later sends do not reserve extra blank space.
Restore Android initial composer insets and iOS focus-aware dictation insets.

Keep opening and final assistant replies visible around completed folds,
anchoring Worked for at the first hidden item while preserving v2 relationship
cards and execution-attempt behavior.

Validation: 107 focused tests and the mobile typecheck pass. Formatting passes;
scoped lint and React Doctor report warnings but no errors. No simulator run.
…rk (#4793)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
…7105)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Retain main's changes while preserving v2 orchestration, queue/steer controls,
composer-only tasks, timeline timers, and mobile scrolling fixes.

Port opt-in restart continuation through durable v2 effects, with shutdown
race guards, activation gating, retry deduplication, and native Codex resume.
Use narrow projection reads for control effects and runtime-request replies.
Surface Claude fallback notices without failing the turn or hiding the notice.
Report missing workspace folders before provider startup.

Carry over custom models and prices, bounded client caches and stream cleanup,
lazy image loading, persistent changed-file trees and sidebar filters, Safari
cookie import, theme fixes, POSIX file-link case, private-host favicon filtering,
native provider update paths, and platform portability updates.
Migration ids remain unchanged.

Validated scoped typechecks and focused server, web, mobile, client-runtime,
contracts, desktop, shared, SSH, script, and resource-monitor tests. Preserved
all 347 original commits and checked the final tree against both saved tips.

Model: GPT-6. Harness: Codex.
Worktree preparation previously exposed only a generic fetch failure. Classify
known authentication, network, repository access, and reference-lock errors
using stable Git diagnostics, without retaining raw output or credentials.
Unknown failures keep the existing generic message.

Cover failure classification and redaction, a real missing local remote, and
propagation into a failed prepared run without creating a worktree or running
setup. The launch test waits for the persisted failure event.

Validation: 38 focused tests, server typecheck, and scoped lint passed.
Carry main's session refresh, provider maintenance, runtime diagnostics,
composer focus, preview, usage, and mobile outbox fixes into the v2 branch.
Keep queue/steer submission, composer-only task progress, v2 subagent cards,
and LegendList scroll ownership.

Project thread and shell events before transport buffering while retaining
full durable history. Dismiss native questions when provider turns finish,
with a transaction guard that preserves answers submitted concurrently.
Port Claude limit notices and Codex file approval details to v2 adapters.

Validated with focused server, web, mobile, client-runtime, shared, desktop,
and marketing tests; affected package typechecks and scoped lint pass.
All 349 branch commits retain their authors and messages. Migration files
and the previous worktree-fetch, stash, panel, and mobile inset fixes remain
unchanged.
Offline CLI and HTTP project removal dropped force and left native v2 threads
behind. Move the nonempty-project guard and durable child cleanup into the
shared project service, and forward force from CLI, HTTP, and WebSocket calls.

Reuse the thread deletion planner and command lock, hydrate migrated history
before attachment cleanup, and validate child receipts. Commit the project
deletion after its children so failed cleanup can be retried safely.

Validation covers CLI deletion with active and archived threads, missing
workspaces, durable cleanup, partial retries, migrated attachments, receipt
collisions, and concurrent thread updates. Scoped server tests, typecheck, and
lint pass.

Implemented with Codex (GPT-6).
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: shivam <91240327+shivamhwp@users.noreply.github.com>
@cursor

cursor Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@juliusmarminge

Copy link
Copy Markdown
Member

The timeline already surfaces orchestration agents (deriveAgentSpawnSummary in MessagesTimeline). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants