mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-21 06:11:45 +00:00
935d91196b
All repo mutations (places, budget, packing, todo, accommodation, reservations, files) and tripSyncManager's syncTrip() use awaited Dexie writes that would stall indefinitely under the same root cause as the dashboard cold-path hang: Dexie keeping a stale connection after DevTools "Clear site data" fires a versionchange event while the tab is open. Registering an explicit versionchange handler that calls close() lets Dexie cleanly discard the stale connection. The next operation triggers auto-reopen with a fresh IDB connection where writes succeed. This is the standard Dexie pattern and prevents the stall from affecting any part of the app. Also tighten the toArray() guard in tripRepo.list() to catch() a rejection (from a potential close() race) in addition to timing out.