()
| 139 | * server-side source of truth for this UI-only state. |
| 140 | */ |
| 141 | export function loadCollapsedWorkspaces(): string[] { |
| 142 | const parsed = safeGetJson<unknown>(STORAGE_KEYS.collapsedWorkspaces); |
| 143 | if (!Array.isArray(parsed)) return []; |
| 144 | return parsed.filter((id): id is string => typeof id === 'string'); |
| 145 | } |
| 146 | |
| 147 | export function saveCollapsedWorkspaces(ids: Iterable<string>): void { |
| 148 | safeSetJson(STORAGE_KEYS.collapsedWorkspaces, Array.from(ids)); |
no test coverage detected