t3code icon indicating copy to clipboard operation
t3code copied to clipboard

subagent ui

Open kridaydave opened this issue 4 months ago • 4 comments

[!NOTE] Medium Risk Touches provider event ingestion and OpenCode session lifecycle (idle/error/stop), which can affect how in-flight subagent state is closed; timeline/session-logic changes are user-visible but mostly additive.

Overview Introduces subagent as a first-class activity tone so collab_agent_tool_call lifecycle events surface as subagent.started / updated / completed instead of generic tool rows, with richer payloads (itemId, default status, truncated titles).

OpenCode now drives that path from subtask message parts (start on first sight, complete on removal) and auto-completes any still-open subtasks when a turn goes idle, errors, stops, or the session exits unexpectedly; collab-agent tool parts are no longer double-emitted as tool lifecycle events.

On the chat timeline, subagent work renders as compact status cards (spinner / success / failure), generic placeholder labels are hidden, subagent groups allow up to four visible entries before “show more,” and turn/work toggles keep scroll position stable when expanding.

Work-log derivation treats subagents like tool-like entries, merges lifecycle updates by itemId/toolCallId even when events interleave, and refuses to collapse two concurrent subagent.started rows unless they share the same id.

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

[!NOTE]

Add subagent UI rendering with lifecycle tracking and timeline grouping

  • Adds a subagent tone to orchestration activities and session logic, so subagent tool calls (type collab_agent_tool_call) emit dedicated subagent.started/updated/completed events instead of generic tool lifecycle events.
  • SimpleWorkEntryRow renders subagent entries as compact status cards with a live spinner during progress and check/X badges on completion or failure, including normalized agent names.
  • collapseDerivedWorkLogEntries and shouldCollapseToolLifecycleEntries now merge subagent lifecycle entries across interleaved sequences using collapseKey or itemId-based correlation, including transpose-safe collapse when title/detail swap.
  • Timeline hides generic placeholder names (e.g. 'Subagent', 'task') and groups subagent entries with a higher inline cap (4 vs the default) and updated Show more/fewer toggle labels.
  • Expanding or collapsing folds and work groups now preserves viewport scroll position via requestAnimationFrame anchoring.

Macroscope summarized 80b2759.

kridaydave avatar Jul 29 '26 05:07 kridaydave

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

[!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: Pro Plus

Run ID: bc0a445a-d1c7-4576-9097-5f333cd4b82f

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

coderabbitai[bot] avatar Jul 29 '26 05:07 coderabbitai[bot]

Approvability

Verdict: Needs human review

1 blocking correctness issue found. This PR introduces new subagent UI capability across server, web, and mobile. Multiple high-severity unresolved comments identify potential bugs including resource leaks, React hooks violations, and missing mobile collapse logic that require attention before merging.

You can customize Macroscope's approvability policy. Learn more.

macroscopeapp[bot] avatar Jul 29 '26 05:07 macroscopeapp[bot]

https://github.com/user-attachments/assets/4bcec07b-5af0-415c-a3f9-10142b6785c2

https://github.com/user-attachments/assets/e2856629-a0a5-4d1a-8289-6ddbf5907c5e

Before and after UI

kridaydave avatar Jul 29 '26 06:07 kridaydave