fix(desktop): bot navigation no longer forces the all-profiles sidebar on - #89031
Closed
marketing2981 wants to merge 1 commit into
Closed
fix(desktop): bot navigation no longer forces the all-profiles sidebar on#89031marketing2981 wants to merge 1 commit into
marketing2981 wants to merge 1 commit into
Conversation
…r on
Every `host.openSession` call in the Bot Mode plugin omitted
`keepAllProfilesScope`, so the SDK applied its default and flipped
`$showAllProfiles` back on whenever the target session belonged to a
different profile than the live gateway:
```ts
// sdk/index.ts
if (profile && profile !== $activeGatewayProfile.get()) {
await ensureGatewayProfile(profile)
if (options.keepAllProfilesScope !== false) {
setShowAllProfiles(true)
}
}
```
For anyone running more than one profile this silently undid the sidebar
profile filter: narrow Sessions to one profile, click any other bot, and
the unified all-profiles list came back. Re-tapping the *same* bot was
fine (no profile change, no reset), which made the behaviour look random
rather than like a bug.
Bot navigation is an explicit context switch into that bot's profile —
the opposite of the browse view `keepAllProfilesScope` exists to protect
— so pass `false` at all seven call sites (canonical chat open/adopt/
recovery paths and the Sessions workspace row).
`session-workspace.test.mjs` asserts the exact options object, so it is
updated alongside. Full plugin suite: 254 passing.
teknium1
pushed a commit
that referenced
this pull request
Aug 19, 2026
…r on Every host.openSession call in the Bot Mode plugin omitted keepAllProfilesScope, so the SDK applied its default and flipped $showAllProfiles back on whenever the target session belonged to a different profile than the live gateway (sdk/index.ts: options.keepAllProfilesScope !== false => setShowAllProfiles(true)). For anyone running more than one profile this silently undid the sidebar profile filter: narrow Sessions to one profile, click any other bot, and the unified all-profiles list came back. Bot navigation is an explicit context switch into that bot's profile, so pass keepAllProfilesScope: false at every openSession call site (4 on current main after the plugin.js refactor consolidated the original 7). Salvaged from PR #89031 onto current main; includes contributor mapping.
teknium1
added a commit
that referenced
this pull request
Aug 19, 2026
Contributor
lisajlau
pushed a commit
to lisajlau/hermes-agent
that referenced
this pull request
Aug 20, 2026
…r on Every host.openSession call in the Bot Mode plugin omitted keepAllProfilesScope, so the SDK applied its default and flipped $showAllProfiles back on whenever the target session belonged to a different profile than the live gateway (sdk/index.ts: options.keepAllProfilesScope !== false => setShowAllProfiles(true)). For anyone running more than one profile this silently undid the sidebar profile filter: narrow Sessions to one profile, click any other bot, and the unified all-profiles list came back. Bot navigation is an explicit context switch into that bot's profile, so pass keepAllProfilesScope: false at every openSession call site (4 on current main after the plugin.js refactor consolidated the original 7). Salvaged from PR NousResearch#89031 onto current main; includes contributor mapping.
lisajlau
pushed a commit
to lisajlau/hermes-agent
that referenced
this pull request
Aug 20, 2026
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.
Problem
With more than one profile, the Sessions sidebar profile filter cannot be kept: narrowing Sessions to a single profile works, but clicking any other bot re-enables the unified all-profiles list.
Clicking the same bot again is fine — no profile change, so nothing resets. That asymmetry makes it read as flaky UI rather than a bug.
Cause
sdk/index.tsturns the all-profiles view back on wheneveropenSessioncrosses a profile boundary, unless the caller opts out:The Bot Mode plugin never passes
keepAllProfilesScope, so all seven of itshost.openSessioncalls take that default.That default is right for its original caller — the all-profiles browse list, where switching scope would throw away the view the user is in. It is wrong for bot navigation, which is an explicit context switch into that bot's profile: the user is leaving the unified view, not browsing it.
Fix
Pass
keepAllProfilesScope: falseat all seven call sites — canonical chat open, adopt, pinned/preferred, recovery, and the Sessions workspace row.No new API: the option already exists and is documented in the SDK; the plugin simply was not using it.
Testing
node --test apps/desktop/src/plugins/hermes-bots/tests/*.test.mjs→ 254 passingsession-workspace.test.mjsasserts the exact options object, so its expectation is updated in the same commit.Reproduction
Before: the filter is discarded and every profile's sessions return.
After: the filter holds; the sidebar follows the profile you switched into.
Notes
Found while running six profiles (one bot per brand). The profile count only changes how often it fires — two profiles are enough to reproduce.