Skip to content

fix(desktop): boot-time source restore keeps the All-profiles preference (#93197) - #93279

Closed
ClintonEmok wants to merge 1 commit into
NousResearch:mainfrom
ClintonEmok:fix/show-all-profiles-survives-restart
Closed

ClintonEmok wants to merge 1 commit into
NousResearch:mainfrom
ClintonEmok:fix/show-all-profiles-survives-restart

Conversation

@ClintonEmok

Copy link
Copy Markdown
Contributor

Summary

The "Show all profiles" browse-mode toggle is persisted to localStorage, but every restart it was silently force-collapsed. initializeConnectionsRegistry restores the last-used source at boot via selectConnection, whose post-activation path unconditionally ran $showAllProfiles.set(false) — so a user who enables the unified view loses it on every relaunch.

That collapse is correct for a user-initiated switch (picking a concrete source is a concrete-scope action). The silent boot-time restore is not a user action, and must not mutate the persisted preference.

Fix

Gate both reset sites in selectConnection on the fresh-boot state (pendingTarget === null && $activeConnectionId === null). Boot restore now leaves the flag alone; every real user switch still collapses browse mode.

Testing

  • New regression: boot-time restore leaves showAllProfiles=true intact
  • New regression: user-initiated source switch still collapses it
  • Full existing connections.test.ts suite (15 tests) green; renderer tsc + eslint clean

Fixes #93197

…nce (NousResearch#93197)

The showAllProfiles browse-mode flag is persisted to localStorage, but
every restart it was force-collapsed anyway: initializeConnectionsRegistry
restores the last-used source via selectConnection, and selectConnection's
post-activation path unconditionally ran $showAllProfiles.set(false).

That collapse is correct for a user click on the connection picker (a
concrete-source action), but the silent boot restore is not a user action.
Gate both reset sites on pendingTarget === null && activeConnectionId ===
null (the fresh-boot state) so the persisted preference survives restart,
while any user-initiated switch still collapses browse mode.

Regression tests cover both directions: boot restore preserves true, a
user switch collapses it.

Fixes NousResearch#93197
@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 labels Aug 23, 2026
@OutThisLife

Copy link
Copy Markdown
Contributor

Superseded by #93408.

Your fix is correct and is cherry-picked there with your authorship — you're credited as a co-author.

Folding rather than merging separately: the boot-time restore turned out to be the shared cause behind three reports. #93197 is the browse-mode reset you fixed; the same silent selectConnection also re-homes remote-gateway users onto a local backend seconds after boot (#90174) and duplicates every MCP server on a local-only registry (#91564). Three PRs editing the same 70-line function in sequence was the wrong shape, so #93408 fixes the drift at its source and carries your gate as one of its commits.

Only change to your diff was a blank line for padding-line-between-statements.

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 type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop: "Show all profiles" resets to single-profile on every restart (v0.20.5)

3 participants