A stale event deleted on one device stayed undeletable on every other session: the cached row showed up, the DELETE call returned 404 (server already removed it), the optimistic catch-block restored the row, and the user could never clear it. - Treat HTTP 404 on DELETE as success — the event is already gone, which is the state we wanted. Skip the optimistic restore. - Re-fetch the visible range on document `visibilitychange` (mobile app returns to foreground) and on window `focus` (desktop alt-tab), throttled to once per 10s so rapid tab-flipping doesn't hammer the API. Without a focus refresh, mobile only got fresh server state at page-load and lived on stale data until a full reload. |
||
|---|---|---|
| .. | ||
| fonts | ||
| js | ||
| lib | ||
| app.js | ||
| index.html | ||
| login.html | ||
| manifest.json | ||
| style.css | ||
| sw.js | ||