fix: use singleton IndexedDB connection to prevent blocking

Replaced open/close-per-operation pattern with a single persistent
connection held for the app lifetime. This prevents the DB upgrade
(v1→v2) from being blocked by lingering connections, and eliminates
transaction contention.

Also added onblocked handler that surfaces a clear error instead of
hanging indefinitely.
This commit is contained in:
2026-08-01 18:52:12 +08:00
parent a7697fd4a1
commit 97e294f1d6
3 changed files with 75 additions and 87 deletions
File diff suppressed because one or more lines are too long