mirror of
https://github.com/stablyai/orca.git
synced 2026-09-28 00:02:41 +00:00
persist sidebar collapsed groups across navigation and restart (#722)
* fix: persist sidebar collapsed groups across navigation and restart The sidebar's collapsed-group state was stored as local React state in WorktreeList, so the Sidebar unmount/remount triggered by navigating into Settings discarded it — returning to the main view re-expanded every previously collapsed group. Lift the state into the UI slice alongside groupBy/sortBy/filterRepoIds and persist it via the existing ui:set IPC so collapse state also survives app restarts. * fix: clear collapsed groups when switching groupBy mode Prevents stale keys from accumulating across mode switches and avoids cross-mode key collisions that could leave groups unexpectedly collapsed. --------- Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
This commit is contained in:
co-authored by
Jinwoo-H
parent
5d985a6563
commit
ab81f04fae
@@ -169,6 +169,7 @@ export function getDefaultUIState(): PersistedUIState {
|
||||
sortBy: 'name',
|
||||
showActiveOnly: false,
|
||||
filterRepoIds: [],
|
||||
collapsedGroups: [],
|
||||
uiZoomLevel: 0,
|
||||
editorFontZoomLevel: 0,
|
||||
worktreeCardProperties: [...DEFAULT_WORKTREE_CARD_PROPERTIES],
|
||||
|
||||
@@ -692,6 +692,7 @@ export type PersistedUIState = {
|
||||
sortBy: 'name' | 'smart' | 'recent' | 'repo'
|
||||
showActiveOnly: boolean
|
||||
filterRepoIds: string[]
|
||||
collapsedGroups: string[]
|
||||
uiZoomLevel: number
|
||||
editorFontZoomLevel: number
|
||||
worktreeCardProperties: WorktreeCardProperty[]
|
||||
|
||||
Reference in New Issue
Block a user