Skip to content

[chat] Add navigable links between a subtask and its parent task - #17

Merged
simurg79 merged 3 commits into
mainfrom
feat/subtask-delegation-links
Aug 7, 2026
Merged

[chat] Add navigable links between a subtask and its parent task#17
simurg79 merged 3 commits into
mainfrom
feat/subtask-delegation-links

Conversation

@simurg79

@simurg79 simurg79 commented Aug 7, 2026

Copy link
Copy Markdown
Owner

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 newTask row that starts a delegation and the subtask_result message 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 passed
  • cd src && npx vitest run __tests__/history-resume-delegation.spec.ts — 12/12 passed

Static 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.tsx reports 0/12, with every case throwing TypeError: 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 from ChatRow fails the same way, while a hook-free component in the same run passes; the same component renders fine outside Vitest. Across src/components/chat/__tests__ the tally is 284 failed / 64 passed. resolve.dedupe, absolute-path aliasing, inlining dependencies, a cache clear, and a full node_modules reinstall 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
  • Decision doc: docs/analysis/zoo-code-import-decision.md — selective import from Zoo-Code-Org/Zoo-Code via a fetch-only zoo remote; no merge target, no branch upstream.
  • Baseline correction recorded in that doc: local tree is not on the de-Roo'd v3.54.0 removals. packages/cloud, packages/evals, packages/telemetry, apps/web-evals all still present; only src/services/marketplace and the webview marketplace UI are gone.
  • HIGH-conflict files for any future Zoo realignment overlap this PR exactly: src/core/webview/ClineProvider.ts, packages/types/src/message.ts, webview-ui/src/components/chat/ChatRow.tsx, plus the delegation specs.
  • Base is simurg79/Roo-Code@main. origin (RooCodeInc/Roo-Code) is archived read-only since 2026-05-15 and cannot accept PRs; do not retarget there.
  • Branch was cut from main at parity with fork/main (0 commits ahead pre-commit); the "45 commits ahead" figure in the originating brief is measured against origin/main only.
  • Commits: 3f29da10d feature + tests, 79ddc1993 version/engine bump, b4ed3a534 decision doc.
  • Unresolved signal from the webview investigation: two Vite versions (6.3.5 and 6.3.6) in the dependency graph, with @vitejs/plugin-react compiled against a different one than the workspace pins. Most plausible remaining cause of the split React module instance (sameInternals: false, sameDispatcherRef: false confirmed at runtime). Reproduced under pinned Node 20.19.2, so the v24 engine warning is not implicated.

Bertan Ari 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.
@simurg79
simurg79 merged commit cbb7688 into main Aug 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant