fix(sidebar): preserve pins after partial session loads

This commit is contained in:
Bohdan Triapitsyn
2026-07-12 00:51:36 +03:00
parent fb173067f5
commit 0daad180a1
3 changed files with 10 additions and 6 deletions
@@ -420,7 +420,10 @@ export const useGlobalSessionsStore = create<GlobalSessionsState>((set, get) =>
// instance — drop it.
return { activeSessions: [], archivedSessions: [] };
}
set((state) => applySnapshot(state, nextActiveSessions, nextArchivedSessions, 'ready'));
const status = activeResult.status === 'fulfilled' && archivedResult.status === 'fulfilled'
? 'ready'
: 'error';
set((state) => applySnapshot(state, nextActiveSessions, nextArchivedSessions, status));
return { activeSessions: nextActiveSessions, archivedSessions: nextArchivedSessions };
} catch (error) {
if (generation !== loadGeneration) {