feat(session): persist accordion collapse state across session views - #560
Open
RonenMars wants to merge 4 commits into
Open
feat(session): persist accordion collapse state across session views#560RonenMars wants to merge 4 commits into
RonenMars wants to merge 4 commits into
Conversation
Add a viewPrefs store that persists via AsyncStorage which tree-view server accordions the user collapsed and whether the browse-view recent-directories accordion is open, hydrated on startup. Single-server tree view still renders expanded regardless of the saved flag, via the existing multiServer gating.
Hub server accordions now reuse the shared persisted collapsedServers, so a collapsed server stays collapsed across the tree and hub layouts (single-server force-expand still handled by the existing collapseApplies gate). Classic's live-sessions header persists via a nullable flag where null keeps the count-based default and an explicit toggle is remembered.
…d classic Rename the persisted classicSessionsCollapsed flag to sessionsHeaderCollapsed and wire both the tree and classic views to it, so the live-sessions header keeps the same collapsed state when switching layouts (matching how the server accordion is already shared between tree and hub).
…stency The merged classic list (MergedClassicList in app/index.tsx) kept its own local server-accordion and live-sessions-header state. Wire both to the shared viewPrefs store so a collapsed server and the live-sessions header stay consistent across the tree, hub, and classic layouts.
RonenMars
force-pushed
the
feat/persist-accordion-collapse-state
branch
from
August 8, 2026 18:17
c664415 to
2321a45
Compare
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
viewPrefszustand store (AsyncStorage-backed, hydrated on startup) that persists collapsible-section state across app restarts.multiServergate.collapsedServers, so a collapsed server stays collapsed across the tree and hub layouts.nullkeeps the count-based default and an explicit toggle is remembered.Test plan
__tests__/unit/stores/viewPrefs.test.ts(6 tests) andcollapsedServerLockout.test.tspass