Repository navigation
🤖 feat: sub-agent tasks strip in the VS Code webview dock - #5657
Merged
Merged
Conversation
Codex Review SummaryThis 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. |
Member
Author
Readiness record
Generated with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Last layer of the #5109 stack, after #5651 (merged: live host workspace list). The VS Code webview dock now shows the desktop sub-agent tasks strip above the background processes strip. It reuses the shared
SubAgentTasksContent(#5634). A newSubAgentTasksDockfeeds it from the host's live workspace list and a per-workspace activity map. Clicking a row asks the host to select that sub-agent.chatUiCapabilities.subAgentTasksis nowsupported.This layer also moves the host's activity pump from "selected workspace, tied to the chat stream" to "selected workspace and its descendants, with its own controller". The activity set is recomputed only when membership changes.
Refs #5109. Nested-run discovery is deferred to #5652; see Scope. I will close #5109 by hand after this PR merges, with a residual comment.
Implementation
Host (
extension.ts,workspaceActivityPump.ts):[selected, ...descendants]and posts a per-workspace map{ activeBashMonitorCount, streaming, activeWorkflowRunIds }. Unchanged maps are not posted. Goal-only (transientGoalOnly) events are skipped because they carry stale baseline fields.activity.list) only when the set differs. Activity events never recompute it: the pump's tracked set is fixed when it starts.isSelectedalso ignores callbacks from a replaced pump.UiWorkspacegains a narrowtaskslice, for sub-agent workspaces only:title,taskStatus,taskExecutionStatus,workflowTask,reportedAt,archivedAt. No paths or prompts. The per-workspace projection compare from 🤖 feat: keep the VS Code host's workspace list live #5651 includes it, so a task status change re-posts the list and an unrelated event still posts nothing.Webview and shared code:
SubAgentTaskWorkspace(Pick<FrontendWorkspaceMetadata, …>) instead of the full metadata.isWorkspaceDelegatedActivityActivetakes the four fields it reads. Desktop callers pass full metadata unchanged, and the webview builds the Pick fromUiWorkspacewithout fabricating fields.SubAgentTasksDockruns the samecollectDescendantAgentsandmergeActiveWorkflowGroupsas desktop. Its per-descendant hints come from activity: monitors, plus a "working" hint = streaming, active workflow runs or armed monitors. The expanded state uses the desktop's persisted key.Scope: nested-run discovery deferred to #5652
Desktop also calls
workflows.listActiveRuns(cold-mount discovery) and pollsworkflows.getRunStatusesfor nested (workflow-in-workflow) runs between workers. Those procedures are not bridged. Without them, a nested run's header leaves the strip once its workers finish. Its enclosing top-level run stays visible from activity as "Workflow · running" (tested), so the strip never reads as empty or "all finished" while a workflow runs. #5652 tracks bridging both procedures.Activity set measurement (perf-owner requirement 3)
In-process harness (the same one as #5651: real
XumChatViewProvider, local oRPC server, 4,502 workspaces), withws-1selected and one sub-agent task under it. A timing-free counter patch counts calls of the set computation. Measured before the two #5651 review fixes were rebased in; they do not touch the activity path.workspacesposts during themws-1,ws-child,ws-child-2Harness (kept outside the repo)
Built with the
make-bench.shfrom #5651, then run fromvscode/asbun test src/bench5109.test.ts -t bench5109b.Counter patch applied to
extension.tsfor the run:Benchmark appended to the copy of
extension.test.ts:Tests
extension.test.ts):activity.list).activity.listis held while removing the descendant replaces the pump. When the held read answers, it posts nothing; only the replacement's map is posted. With the abort and theisSelectedcontroller check both removed, this case fails (12 extra lines received).workspaceActivityPump.test.ts: descendants are tracked; each workspace's monitors, stream flag and workflow runs are posted; goal-only events and other workspaces are ignored; null resets a workspace.vscode webview sub-agent tasks strip (#5109)):selectWorkspace.App.tsxfrom 🤖 feat: keep the VS Code host's workspace list live #5651, both strip tests fail (2 fail): the strip is absent.bun test ./vscode/src/webview/webviewCss.test.tspasses. No CSS files changed.make check-react-compiler: 23/24, with only the existing ProjectSidebarInner skip.Webview at 300 px (narrow VS Code sidebar). It shows nested sub-agents, a Monitoring child and a workflow group:
390 px:
900 px (same rows and labels as the desktop tray):
Risks
Low to medium. Desktop only sees type narrowing, and the existing tray tests pass unchanged. Activity no longer stops when the chat stream ends; it stops on deselection, file mode, refresh failure or dispose.
Size: 559 changed lines (477+, 82-), tests included. The coordinator accepted up to 560. The reason: the activity pump moved here from #5651 to keep that layer small, and this layer must also delete main's chat-tied pump (23 lines of deletions).
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high• Cost:$48.29