Files
outline/app/utils
Claude 6455506edc feat: Persist policies to IndexedDB so abilities survive reload
Adds a StorePersistence layer that caches a store's models in IndexedDB
and hydrates them back at boot as stale data, revalidated by normal API
traffic. Enabled for the policies store, scoped per team, so cached
abilities are available immediately after a reload instead of every
policy needing a forced refetch.

- Persistence hooks in the base Store add/remove/clear methods, since
  add() updates existing models in place and map observation would miss
  those changes
- Enabled from RootStore construction (team read from localStorage) and
  again after auth.info succeeds to cover the first session after login
- Store.clear() wipes the persisted records, covering both logout paths
- deleteAllDatabases() fallback removes the policies database on
  browsers without indexedDB.databases()

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XisV6sRdexfnPSiehurKoV
2026-08-16 11:56:10 -04:00
..
2023-02-14 19:03:54 -05:00
2026-04-18 15:12:57 -04:00
2026-04-18 15:12:57 -04:00
2026-07-10 12:35:21 +02:00
2026-07-10 12:35:21 +02:00