Keep sidebar pins visible while reopening (#2210)

* fix(app): keep sidebar pins visible while reopening

Hidden sidebars stop consuming live workspace updates but retain their last rendered entries so the opening animation never exposes an empty list.

* test(app): reuse sidebar pin flow
This commit is contained in:
Mohamed Boudra
2026-07-18 22:26:31 +02:00
committed by GitHub
parent 8cc2ae0ba4
commit 0cfb9b6b94
3 changed files with 36 additions and 1 deletions
@@ -38,7 +38,10 @@ export function useSidebarWorkspaceEntries(
// subscription to structurally shared indexes, never one session-store
// subscription per mounted row.
return useMemo(() => {
if (!enabled || placements.length === 0 || sessions.length === 0) {
if (!enabled) {
return previousEntriesRef.current;
}
if (placements.length === 0 || sessions.length === 0) {
previousEntriesRef.current = EMPTY_ENTRIES;
return EMPTY_ENTRIES;
}