fix(desktop): boot-time source restore keeps the All-profiles preference (#93197) - #93279
Closed
ClintonEmok wants to merge 1 commit into
Closed
ClintonEmok wants to merge 1 commit into
ClintonEmok wants to merge 1 commit into
Conversation
…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
This was referenced Aug 24, 2026
Merged
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 Only change to your diff was a blank line for |
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.
Summary
The "Show all profiles" browse-mode toggle is persisted to localStorage, but every restart it was silently force-collapsed.
initializeConnectionsRegistryrestores the last-used source at boot viaselectConnection, 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
selectConnectionon the fresh-boot state (pendingTarget === null && $activeConnectionId === null). Boot restore now leaves the flag alone; every real user switch still collapses browse mode.Testing
showAllProfiles=trueintactconnections.test.tssuite (15 tests) green; renderer tsc + eslint cleanFixes #93197