Issue 824
Theme provider and selector read localStorage without a guard
Back to our planOpen
frontendtech-debtpriority: lowscope-creep
Summary
In a browser that blocks site storage, the theme code can throw when it reads the saved light or dark choice.
Details
InitTheme.tsx wraps its localStorage read in try/catch, but ThemeProvider.client.tsx (mount effect, system-change listener, setTheme) and ThemeSelector.client.tsx read and write it unguarded. Found while writing the theme note (#791); listed under its Known gaps.
Acceptance criteria
- Not done: A test shows the provider and selector still work, and keep the system theme, when storage throws.
- Not done: No other behavior changes.
Generated by Claude Code, opens in a new tab
Generated by Claude Code, opens in a new tab