// View state for this browser tab that survives switching between the app's tabs (the views // remount), like the workspace's open note: which list was open, list or Kanban view const PREFIX = 'mindsift_view:'; export function readViewSession(view: string): Partial { try { const raw = JSON.parse(sessionStorage.getItem(PREFIX + view) || '{}'); return raw && typeof raw === 'object' ? raw : {}; } catch { return {}; } } export function writeViewSession(view: string, state: T) { try { sessionStorage.setItem(PREFIX + view, JSON.stringify(state)); } catch { // storage blocked: the view simply starts fresh } }