fix(app): keep root tab active for subagents - #43616
Open
opencode-agent[bot] wants to merge 1 commit into
Open
Conversation
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
Version comparison
The reported build is
0.0.0-beta-17727(2a7d0729d0). The next/latest successful beta is0.0.0-beta-17728(f929856cdf). The only commit between them updates Nixnode_moduleshashes; there are no changes underpackages/app,packages/client, orpackages/session-ui. The different reproduction result is therefore state/timing-dependent, not a behavior difference between these two beta builds.Root cause
Titlebar tabs represent root sessions, but the routed page identifies the currently viewed leaf session.
packages/app/src/components/titlebar.tsxpreviously matched a routed session tab in two steps only:parentIDThat has two failure modes:
currentTab()is undefined and the root tab renders inactive.leaf.parentID === intermediateChildID, while the stored tab is keyed by the root ID. The root tab never matches, and reconciliation can add the intermediate child as a second tab.Call stack and data flow
The complete-lineage primitive already exists in
packages/app/src/utils/session-route.ts, and the loaded-data resolver exists atpackages/client/src/solid/data.tsasdata.session.root(sessionID).Fix
packages/app/src/components/titlebar.tsxnow:rootSession()when cached ancestry is incompleteValidation
Passed:
bun typecheck(packages/app)bun run typecheck:e2e(packages/app)bun test --conditions=solid --preload ./happydom.ts ./src/utils/session-route.test.ts(4 passed)git diff --checkThe focused Playwright test was attempted locally, but this shared host could not initialize Rolldown's Rayon thread pool (
ThreadPoolBuildError: Resource temporarily unavailable) before the page fixture started. CI should execute the added regression.Requested by: @Hona (Hona via Slack)