[chat] Add navigable links between a subtask and its parent task - #17
Merged
Conversation
added 3 commits
August 6, 2026 21:29
Adds parent/child task identifiers to the message payload so the chat UI can render navigable links between a delegated subtask and the task that spawned it, including after a history resume.
Documents that three of the four candidate imports are already present locally, corrects the assumed v3.54.0 baseline, and settles on adding Zoo Code as a read-only remote for targeted cherry-picks rather than a wholesale realignment.
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.
What is the problem?
When a task delegates work to a subtask, the chat history gave no way to move between the two. A reader could see that a delegation happened, but had to hunt through the task list to find the child task, and from the child there was no route back. The link was also lost entirely after resuming a task from history.
How does this PR solve the problem?
Parent and child task identifiers are now carried on the message payload, so the chat UI can render a "Go to subtask" link on both the
newTaskrow that starts a delegation and thesubtask_resultmessage that reports its outcome.The interesting part is picking the correct child when a task delegates several times. Matching purely on position breaks as soon as a delegation is rejected or a result arrives out of order, so a result carries its own child identifier where one is available and that stamp wins; positional matching against the parent's child list is only the fallback for older messages that predate the stamp. The tests cover the awkward cases directly: several subtasks completing, a result that is not adjacent to the row that spawned it, and a rejected delegation sitting in the middle of the sequence.
Two changes here are unrelated to the feature and are bundled at the author's request rather than because they belong together. The extension version moves to 3.53.5 and the minimum VS Code version rises to ^1.120.0. Reviewers should note the version skips 3.53.4 and has no matching entry in
.changeset/, and that the engine bump will exclude users on older VS Code builds. The decision document is likewise independent: it records why the fork should import from Zoo Code selectively via a read-only remote instead of realigning wholesale, which matters here because this delegation code sits in exactly the files that would conflict most in such a merge.How did you test the PR?
Backend suites are green:
cd src && npx vitest run __tests__/provider-delegation.spec.ts— 4/4 passedcd src && npx vitest run __tests__/history-resume-delegation.spec.ts— 12/12 passedStatic checks are green across all packages:
turbo lint— 10/10 tasks successful (pre-commit hook)turbo check-types— 10/10 tasks successful (pre-push hook)The webview suite could not be verified locally and needs CI to adjudicate it.
cd webview-ui && npx vitest run src/components/chat/__tests__/ChatRow.subtask-links.spec.tsxreports 0/12, with every case throwingTypeError: Cannot read properties of null (reading 'useState')during render, before any assertion executes.The evidence says this is a pre-existing local environment fault, not a defect in this change.
ChatRow.diff-actions.spec.tsx, which this branch does not touch, fails 7/7 with the identical error, and the crash originates in the shared test-utils extension-state provider rather than in any modified file. A scratch component with no mocks and no imports fromChatRowfails the same way, while a hook-free component in the same run passes; the same component renders fine outside Vitest. Acrosssrc/components/chat/__tests__the tally is 284 failed / 64 passed.resolve.dedupe, absolute-path aliasing, inlining dependencies, a cache clear, and a fullnode_modulesreinstall were all tried without effect, and no test was skipped, weakened, or deleted. Please confirm against CI — if CI is green, the fault is local to one machine and belongs in the environment, not the repo.Agent notes
docs/analysis/zoo-code-import-decision.md— selective import fromZoo-Code-Org/Zoo-Codevia a fetch-onlyzooremote; no merge target, no branch upstream.packages/cloud,packages/evals,packages/telemetry,apps/web-evalsall still present; onlysrc/services/marketplaceand the webview marketplace UI are gone.src/core/webview/ClineProvider.ts,packages/types/src/message.ts,webview-ui/src/components/chat/ChatRow.tsx, plus the delegation specs.simurg79/Roo-Code@main.origin(RooCodeInc/Roo-Code) is archived read-only since 2026-05-15 and cannot accept PRs; do not retarget there.mainat parity withfork/main(0 commits ahead pre-commit); the "45 commits ahead" figure in the originating brief is measured againstorigin/mainonly.3f29da10dfeature + tests,79ddc1993version/engine bump,b4ed3a534decision doc.6.3.5and6.3.6) in the dependency graph, with@vitejs/plugin-reactcompiled against a different one than the workspace pins. Most plausible remaining cause of the split React module instance (sameInternals: false,sameDispatcherRef: falseconfirmed at runtime). Reproduced under pinned Node 20.19.2, so the v24 engine warning is not implicated.