633406c05b
Three nearly-identical try/catch wrappers across theme + player stores collapse to read()/write()/remove() in lib/util/safeLocalStorage.ts. Sets the pattern for future stores. Caller still does parse/serialize since the existing call sites store strings (theme preference, volume number) — no JSON wrapper needed yet. persisted.ts left alone — its JSON-payload + per-key-suffix shape is distinct enough to keep self-contained. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>