Repository navigation
Revert startup pane reconciliation so handoff does not open a new split - #3006
Merged
Merged
Conversation
This reverts commit 970480f.
SawyerHood
deleted the
bb/fix-handoff-opening-new-split-thr_9g9bd7kp4n
branch
September 3, 2026 15:32
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.
Human comments
What was wrong
The "Handoff to new thread" action opened the composer in a new split pane instead of the focused pane.
handleHandoffToNewThreadnavigates to the legacy project compose path/projects/:projectId(apps/app/src/views/thread-detail/ThreadDetailPromptArea.tsx:1004).SplitWorkspaceRouteanswers that path withLegacyProjectComposeRedirect, so React unmountsSplitThreadArea. The redirect then replaces the URL with/, andSplitThreadAreamounts again. PR #2921 gated its startup reconciliation behind a per-mountuseRef, so the remount looked like a fresh startup. The mount effect therefore calledreconcileRestoredLayoutForContent, which splits the rightmost pane to the right fornew-threadcontent. A handoff from the personal project did not show the bug, becausegetProjectComposeRoutePathreturns/for that project and no unmount happens.What changed
This pull request reverts commit
970480f6c6(PR #2921). It removesreconcileRestoredLayoutForContentfromapps/app/src/views/thread-detail/splitThreadNavigation.ts, removes theshouldReconcileRestoredLayoutref fromapps/app/src/views/thread-detail/SplitThreadArea.tsx, and removes that PR's regression test. Route reconciliation again always replaces the focused pane. The change does not touch a wire protocol,HOST_DAEMON_PROTOCOL_VERSION, a CLI surface, a schema, or a stored-data format.Note the cost of this revert: issue #2919 comes back. After a restart with a restored multi-pane layout on
/, the composer replaces a restored thread pane instead of joining the layout at the right edge. A later change can fix both bugs together. It must make the startup guard true only for the first route reconciliation of the session, and not for each mount ofSplitThreadArea.How you verified
pnpm exec turbo run typecheck --filter=@bb/apppassed.pnpm exec turbo run test --filter=@bb/app -- SplitThreadArea splitThreadNavigationpassed with 4 test files and 58 tests.ensure-native-modulesprerequisite with abetter-sqlite3segmentation fault. That step is unrelated to this change, and the retry passed.Fixes #
This revert reopens #2919.