Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions apps/desktop/src/store/session-states.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
setActiveSessionStoredIdRotation
} from './session'
import { isSecondaryWindow } from './windows'
import { routeSessionId } from '@/app/routes'

// ---------------------------------------------------------------------------
// Reactive per-runtime session state (view mirror of the wiring cache).
Expand Down Expand Up @@ -561,11 +562,17 @@ export function focusOpenSession(storedSessionId: string): boolean {

// Already the main session: front the workspace tab and drop tile focus so
// the readouts + sidebar highlight come home (a no-op when main is focused).
// Only skip navigation when the current URL is already a session route —
// on a non-session page (e.g. /messaging) the sidebar highlight reads
// currentView from the URL, so revealing the workspace pane alone won't
// update it. Fall through to the caller's navigate() instead.
if (storedSessionId === $selectedStoredSessionId.get()) {
revealTreePane('workspace')
noteActiveTreeGroup(null)

return true
if (routeSessionId(window.location.pathname)) {
revealTreePane('workspace')
noteActiveTreeGroup(null)
return true
}
return false
}

return false
Expand Down
Loading