Repository navigation
feat(site/src/pages/AgentsPage/components/ChatElements/tools): show subagent isolation on the spawn and wait cards - #152
Conversation
…ubagent isolation on the spawn and wait cards With experiment fork-subagent-isolation on, the spawn_agent and wait_agent cards show the child's branch and worktree, or its workspace, and the wait card shows the worktree's diff summary or the error that replaced it.
…dress frontend review of the isolation fields
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Closing and reopening only to make GitHub recompute the merge ref against current main ( |
The merge ref now points at current main ( |
Merge evidence for head
|
Part of #9. With experiment
fork-subagent-isolationon,spawn_agentandwait_agentreturn where an isolated child works, andwait_agentalso returns a summary of a worktree child's work. The tool cards didn't show any of it, so a user had to read the raw result to find the child's branch.With the experiment on, the cards now show these fields below the header, so they stay visible while the card is collapsed:
Branch: <branch>andWorktree: <path>. A long path is truncated, and the full path is in its tooltip.Workspace: <name>. If the server couldn't look up the workspace, the card shows itsworkspace_erroras an error detail.wait_agentcard of a worktree child that finished shows itsdiff_summaryon one line, for example2 commits, 3 files changed, +41 -7, 1 uncommitted change. The uncommitted part is left out when there are none. If the summary request failed, the card showsdiff_summary_erroras an error detail instead.The
wait_agentfields offork-chat-todos(recent tool calls) still need that experiment, and the isolation fields now show without it. Withfork-subagent-isolationoff, the cards look as they did before.Code
site/src/pages/AgentsPage/components/ChatElements/tools/ForkSubagentFields.tsx:IsolationFieldsandformatDiffSummary, gated on the experiment.ForkSubagentFields.stories.tsx: stories for a worktree spawn (with the experiments on and off), a workspace spawn, a workspace spawn whose lookup failed, and a finished worktree wait with a summary and with a summary error.Checks
biome check,oxlint,tscandvitest run --project=unit src/pages/AgentsPage/components/ChatElements/tools(19 files, 301 tests) pass. The change adds no Vitest test: the fields have no interaction or state, and the stories cover each visual state.frontend-deep-reviewran all eight roles; the second round, after fixes, has no findings.UAT
Ran on 2026-11-10 with this branch's frontend (
c20eecb615, Vite dev server) against the:3200fork branch server (v2.39.1-devel+90e67455c6,fork-subagent-isolationon), as a member user, in a real chat on a Docker workspace. The chat spawned one child withisolation: worktreeandrepo_path, waited for it, then spawned and waited for one shared child.Branch: agent/worktree-child-41c6b0eb,Worktree: /home/coder/.coder/worktrees/proj/41c6b0eb-…, and1 commit, 1 file changed, +1 -0, which match thewait_agentresult (diff_summary.commits: 1). The shared child's cards show no isolation lines. Checked in light and dark themes./api/v2/experimentsresponse stubbed withoutfork-*experiments, server unchanged): the same chat renders the plain upstream cards with no branch, worktree, or diff lines.Screenshots are kept with the UAT notes and are available on request.