Skip to content

fix(desktop): scope session lookup to the active profile (supersedes #79522) - #89833

Merged
OutThisLife merged 1 commit into
mainfrom
bb/scope-session-lookup
Aug 19, 2026
Merged

fix(desktop): scope session lookup to the active profile (supersedes #79522)#89833
OutThisLife merged 1 commit into
mainfrom
bb/scope-session-lookup

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Summary

Supersedes #79522.

Opening a saved chat on a non-default profile (Bot Mode, cron runs) did an unscoped getSession. Electron sends that to the primary backend. A 404 then skipped the active profile in the remaining probes, so the session was never found.

This passes the active profile on the first lookup, matching the later probes.

What was dropped from #79522

  • Overlay mainIsCovered navigation for Cron / Command Center. openSession(..., 'main') already covers Bot Mode; overlay dismiss is a separate bug.

Test plan

  • npx vitest run --project ui src/app/session/hooks/use-session-actions/resolve-stored-session.test.ts — 10 passed
  • Open a Bot Mode chat on a non-default profile while Desktop's primary backend is still default

Credit: @mmcallister8 (primary).

@OutThisLife
OutThisLife enabled auto-merge August 19, 2026 07:05
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) area/profiles Multi-profile isolation, HERMES_HOME scoping sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Aug 19, 2026
Unscoped getSession hits the primary backend. A 404 then skipped the
active profile in the remaining probes, so chats on a non-default
profile never loaded.

Co-authored-by: Michael McAllister <michael@empowerlo.com>
@OutThisLife
OutThisLife force-pushed the bb/scope-session-lookup branch from cd90b3b to d959ba5 Compare August 19, 2026 15:51
@OutThisLife
OutThisLife merged commit 3f33bb8 into main Aug 19, 2026
41 checks passed
@OutThisLife
OutThisLife deleted the bb/scope-session-lookup branch August 19, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants