Bound retained workspace screens (#1472)
* fix(app): prune retained workspace deck entries * fix(app): narrow workspace deck retention selectors * fix(app): preserve deck lru during route transitions * test(app): update startup reconnect expectation
This commit is contained in:
@@ -17,7 +17,10 @@ export type { DesktopBadgeWorkspaceStatus } from "@/utils/desktop-badge-state";
|
||||
export type { WorkspaceStructure, WorkspaceStructureProject } from "@/projects/workspace-structure";
|
||||
|
||||
export interface SessionsSnapshot {
|
||||
sessions: Record<string, { workspaces: Map<string, WorkspaceDescriptor> }>;
|
||||
sessions: Record<
|
||||
string,
|
||||
{ hasHydratedWorkspaces?: boolean; workspaces: Map<string, WorkspaceDescriptor> }
|
||||
>;
|
||||
}
|
||||
|
||||
export interface SidebarOrderSnapshot {
|
||||
@@ -110,6 +113,21 @@ export function selectWorkspaceFields<T>(
|
||||
return workspace ? project(workspace) : null;
|
||||
}
|
||||
|
||||
export function selectWorkspaceExists(
|
||||
state: SessionsSnapshot,
|
||||
serverId: string | null,
|
||||
workspaceId: string | null,
|
||||
): boolean {
|
||||
return selectWorkspace(state, serverId, workspaceId) !== null;
|
||||
}
|
||||
|
||||
export function selectHasHydratedWorkspaces(
|
||||
state: SessionsSnapshot,
|
||||
serverId: string | null,
|
||||
): boolean {
|
||||
return serverId ? (state.sessions[serverId]?.hasHydratedWorkspaces ?? false) : false;
|
||||
}
|
||||
|
||||
export function selectWorkspaceExecutionAuthority(
|
||||
state: SessionsSnapshot,
|
||||
serverId: string | null,
|
||||
|
||||
Reference in New Issue
Block a user