In src/hooks/useLocalStorage.ts, the set function calls localStorage.setItem(key, JSON.stringify(s)) with no try/catch, while the initial read is wrapped in one.
In private browsing/quota-exceeded scenarios (used by useContacts and useTheme), this throws uncaught, updates React state without persisting it, and can bubble into ErrorBoundary, wiping the in-progress UI. Wrap the write in a try/catch and surface a toast/error state instead of throwing.
In
src/hooks/useLocalStorage.ts, thesetfunction callslocalStorage.setItem(key, JSON.stringify(s))with no try/catch, while the initial read is wrapped in one.In private browsing/quota-exceeded scenarios (used by
useContactsanduseTheme), this throws uncaught, updates React state without persisting it, and can bubble intoErrorBoundary, wiping the in-progress UI. Wrap the write in a try/catch and surface a toast/error state instead of throwing.