Skip to content

fix(desktop): scope sidebar session search to active profile - #114102

Open
cspiritsong wants to merge 1 commit into
NousResearch:mainfrom
cspiritsong:feat/sidebar-profile-scope
Open

cspiritsong wants to merge 1 commit into
NousResearch:mainfrom
cspiritsong:feat/sidebar-profile-scope

Conversation

@cspiritsong

Copy link
Copy Markdown

Scopes desktop sidebar full-text session search to the active profile context.

Currently, searchSessions() in apps/desktop/src/api/sessions.ts queries /api/sessions/search without passing a profile parameter, causing search to hit the primary database even when browsing a concrete profile.

This wires the active profileScope through searchSessions, keeps All Profiles unscoped, and adds a scope-tracking guard (serverMatchesScope) to drop in-flight responses from a prior profile after a switch.

Successor to #83640 (narrowed to search following #87566's cache salvage, reopened on a fresh head after upstream refactors).

Tested via vitest (src/hermes.test.ts) and manual profile switching.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state labels Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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