https://sonarly.com/issue/16799?type=bug
The metadata store persists all 25 entity collections (including fieldMetadataItems with full field definitions for every object) to localStorage via Jotai's atomWithStorage, which has no error handling for quota limits. Users with many custom objects exceed the ~5MB localStorage limit.
Fix: **Root cause fix**: The `createAtomFamilyState` and `createAtomState` utilities pass `undefined` as the storage parameter to Jotai's `atomWithStorage`, which uses the default `createJSONStorage(() => localStorage)` — a storage implementation that calls `localStorage.setItem` without any error handling.
**Fix**: Both files now provide a custom storage via `createJSONStorage()` that wraps `localStorage.setItem` in a try/catch. When a `QuotaExceededError` (or any write error) occurs, the write is silently skipped. The in-memory Jotai atom state remains correct — localStorage persistence is treated as best-effort for faster initial loads, not as the source of truth.
This matches the team's existing pattern of custom storage implementations (see `createJotaiCookieStorage.ts`) and uses `createJSONStorage` from `jotai/utils` which is the documented Jotai API for this purpose.
The `getItem` and `removeItem` methods delegate directly to `localStorage` since they don't have quota concerns.