Repository navigation
Conversation
…s thread Co-Authored-By: Claude <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Child-input actions now open the subagent thread in its own environment on web and mobile. This is a contained navigation correction that preserves existing same-environment behavior and availability safeguards. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Configure child inputs and test navigation apps/web/src/components/chat/useThreadLifecycle.browser.test.tsx |
The test mock provides configurable child inputs and resets them between tests. Parameterized cases cover local and remote child environments, optional pending approvals, and question, child, or approval links. The harness renders the child description and actions. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Possibly related issues
#29318— The tests cover remote child navigation through child and approval links.
Suggested reviewers: batuhan1999
Merge Risk: 
Minimal · up to 1ed11
-
The added tests cover opening child threads in their own environment. No material merge risk was identified.
Pre-merge checks: 
3 · 
1
-
Failed checks: 1 inconclusiveCheck name Status Explanation Resolution Linked Issues check Issue #27005requires that the child-input banner open the child thread in the child's own environment. The whole-PR diff (merge base edc37c9 to head 1ed113f) changes only apps/web/src/components/ch…Establish whether the background-work 'Open' button navigates to the subagent thread under its own environment. Needed evidence: the onOpenThread handler supplied to backgroundWorkNowItem in useThreadLifecycle.tsx, or a test that clicks 'Op… Passed checks: 3 passed-
Full details: Description check
-
Explanation
The description covers the problem, the test changes, linked issue, verification results, regression evidence, and UI evidence. The scope section does not include an explicit maintainer approval comment, but the description is otherwise mostly complete and focused.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff against the merge base changes one file: useThreadLifecycle.browser.test.tsx (+41/-1). All changes support the test coverage described for
#27005. The added EnvironmentThreadShell type import and the childThreadInputs state support the it.each cases. The reset in setup keeps state isolated between tests. The RestoreBranchHarness rendering of childInputNow.description and childInputNow.actions exposes the buttons that the test clicks. No production source, configuration, or unrelated file changed. The PR description's before/after media and the review history concern the earlier fix and do not add code changes in this diff.
-
Full details: Linked Issues check
-
Explanation
Issue
#27005requires that the child-input banner open the child thread in the child's own environment. The whole-PR diff (merge base edc37c9 to head 1ed113f) changes only apps/web/src/components/chat/useThreadLifecycle.browser.test.tsx. The fix is therefore already present at the merge base. At head, childInputNowItem in ThreadActivityBanners.tsx passes child.environmentId and first.environmentId to onOpenThread. The new it.each test clicks 'Open question', 'Child', and 'Open approval' for local and remote children. It asserts the pathname /<childEnvironmentId>/child. This covers the reported child-input behavior. The test run results were not verified by this assessment. Issue#27005also asks the reviewer to check the background-work banner 'Open' button. In backgroundWorkNowItem, that button calls onOpenThread(onlyThreadId) with a thread id only. The PR does not change or test that path. The onOpenRelatedThread implementation in useThreadLifecycle.tsx was truncated in the read, so it is unknown whether that path resolves to the parent environment.Resolution
Establish whether the background-work 'Open' button navigates to the subagent thread under its own environment. Needed evidence: the onOpenThread handler supplied to backgroundWorkNowItem in useThreadLifecycle.tsx, or a test that clicks 'Open' for a remote background subagent and asserts the route /<childEnvironmentId>/<childThreadId>. If that path already resolves to the child's environment, no change is needed. Also confirm that the new browser test passes at head.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
|
Note Written by Verified in a real dev environmentverified exact head tested on the pr:
blacksmith passed all 9 lifecycle browser tests and short real-provider transcript Not verifiednative ios/android and the electron shell were not run on this linux vm. other providers and transport across separate machines, relay, or tunnel were not exercised. linked environments here were two isolated servers on the same vm. the remote background-work "open" action was not exercised; the question, child-name, and approval actions were. |
…ked-environment # Conflicts: # apps/web/src/components/chat/ThreadActivityBanners.tsx # apps/web/src/components/chat/useThreadLifecycle.browser.test.tsx # apps/web/src/components/chat/useThreadLifecycle.tsx






Problem
#28592 fixed Open question and Open approval opening a blank new thread when the subagent runs on a linked environment, but it shipped without a test, so nothing stops the bug coming back.
This PR started as a fix for the same bug. #28592 landed first, so its code is kept and only the test remains.
Change
Extends the existing
useThreadLifecyclebrowser test, written bymaria-rcks, to cover opening a child from the parent thread:Checks:
vp run check:changedpasses. All 9 tests in the file pass, and the 3 linked-environment cases fail when the web change from #28592 is undone.Closes #27005, which reports this bug and was left open after #28592 merged.
The bug
Before: Open question on a subagent on a linked environment lands on a blank New thread page.
After: the same click opens the subagent's thread with the question ready to answer. Captured with this PR's original fix, which behaved the same way as #28592 in the test above.
The earlier council review covered the original fix, not this test-only diff.
Created with Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running in T3 Code.