Repository navigation
fix(desktop): branched sessions open in the main workspace, not just the sidebar (#93444, salvage #93461) - #93663
Merged
Merged
Conversation
… a tile forkBranch ended by opening the branch as a session-tile and leaving the primary selection on the parent (#69750). In the default layout there is no visible tile pane, so branching only added a sidebar row with no feedback in the main area — and openSessionTile no-ops when the target is already the selected session, the common case of branching the chat you're viewing. Load the branch as the primary session via resumeSession instead, which reuses the runtime already warm-cached by forkBranch's ensureSessionState/updateSessionState calls, so it doesn't cost an extra resume RPC. Fixes #93444
…ssion forkBranch was unconditionally routing every branched session into the main pane via resumeSession, including sidebar/background branches of a session the user isn't currently viewing. That reintroduces the #69750 focus-stealing bug for that path: branching a different session from the sidebar yanked the active view away from whatever was open. Only take over the main pane when the branch's parent is the session already selected; otherwise keep opening it as its own tile.
૮ >ﻌ< ა ci reviewran on 7ea9ad8 — ci: retrigger after 0-job workflow startup failure
|
This was referenced Aug 24, 2026
Closed
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
Branching a session now opens the branch in the main workspace — previously it only appeared as a sidebar row (the fork deliberately avoided selecting it as primary), so in the default layout nothing visible happened and users thought the branch was lost. Fixes #93444.
Changes
apps/desktop/src/app/session/hooks/use-session-actions/index.ts:forkBranchends with primaryresumeSessionin the default layout; tiled layouts keep the tile behavior; scoped to branching the currently selected session so sidebar branches of background sessions don't steal focus (guards the fix(desktop): open branched chat in a new tab and switch to it #69750 regression)Validation
Salvaged from #93461 (@chelsealong), cherry-picked with authorship preserved.
Infographic