Files
Tom Moor 1ca8335717 fix: Recover from closed IndexedDB connections in store persistence (#13523)
* fix: Recover from closed IndexedDB connections in store persistence

StorePersistence cached a single IDBDatabase forever, so once the browser
or another tab closed the connection every subsequent hydrate, flush and
clear threw against a dead handle.

- Close and forget the connection on versionchange, so another tab is
  never blocked from deleting or upgrading the database
- Discard the cached connection on close, open error and blocked, and
  retry once against a fresh connection when one was closed underneath us
- Close open connections before deleteAllDatabases removes them, which
  also stops logout recreating the databases it just deleted

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix: Cancel pending writes when store persistence is disabled

A debounced flush scheduled before disabling would still fire, reopening
and recreating the database that deleteAllDatabases had just removed.
2026-08-22 19:01:39 -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