Repository navigation
feat(web): nest delegated threads under their parent in the sidebar - #587
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
This branch was successfully deployed
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.
Delegated child threads showed up as unrelated top-level rows in the sidebar. They were often sorted above their parent, so it was hard to tell which agent started which task.
What changed
@t3tools/client-runtime/state/delegated-threads):delegated:<parent>:<16 hex>. Parent ids can contain colons, so it doesn't split on:.Sidebar.tsx):docs/user/agent-delegation.mdexplains where children appear.Not covered: the legacy per-project sidebar and the mobile app still list children as ordinary threads. The helper lives in client-runtime so mobile can adopt it later. There is no collapse toggle per parent (a parent has at most eight live children).
Before / after
Isolated dev server with a fixture: a parent with two delegated children, an unrelated thread, and a child whose parent is settled.
"Audit lockfile changes" stays top-level in both because its parent is settled.
Verification
vp test run packages/client-runtime/src/state/delegatedThreads.test.ts: 8 new tests covering id parsing, colon-containing parent ids, malformed ids, environment scoping, orphan fallback, flattening and route containment.Sidebar.logic,Sidebar.drag,Sidebar.motionandSidebar.pointertests: 259 passing together with the new file.vp run -F web typecheckandvp run -F @t3tools/client-runtime typecheckpass, re-run on web after rebasing ontopylon.vp run knip:checkpasses.Sidebar.tsx.Adversarial review (Fable)
The first pass found no blocking issues but verified three real defects, all fixed in
c128af68c1:groupKeys: group rows no longer set the base row height, and a lifted group keeps its own height. Two new tests fail on the old code.resolveSidebarDropTargetnow takes the dragged row's children asnestingKeysand removes them from the destination order, so their order keys are never written. Live check: I pinned the parent, then dragged it back into Active. The order stayed stable across 4 seconds of samples, the children re-nested, and their order keys stayed null in SQLite.Also fixed: a grandchild stays top-level (one-level guard, with a test), and an attribute the live sidebar never reads was removed from the nested list.
The re-review of the fixes found no blocking issues and nothing new. One accepted preview inaccuracy: when a group moves between Pinned and Active, the gap is group-sized, and the children split back out on release. Parent rows with children still re-render on each shell update, because the nested lists are rebuilt on every update anyway.
Done by Claude Opus 5 in Claude Code.