fix(sessions): select the active project using session ownership (#2865)

* fix(sessions): select the active project using session ownership

Keep a same-project worktree session while its rendered map is stale, but switch to the remembered or fallback session when the current session is known to belong to another project.

Fixes #2317

* test(sessions): pin project-switch ownership recovery in the selection hook
This commit is contained in:
Serhii Dziupin
2026-08-13 10:51:40 +03:00
committed by GitHub
parent e7b864e9ae
commit 8a6eca5597
3 changed files with 444 additions and 80 deletions
@@ -1825,6 +1825,7 @@ const SessionSidebarComponent: React.FC<SessionSidebarProps> = ({
openNewSessionDraft={openNewSessionDraft}
setActiveMainTab={setActiveMainTab}
setSessionSwitcherOpen={setSessionSwitcherOpen}
sessionOwnerBySessionId={sessionOwnership.bySessionId}
/>
<SessionPrefetchEffect
enabled={isVisible}