Storage.updatePhoto() now fires a 'photo-updated' CustomEvent so the
queue page refreshes immediately (300ms debounce) when the sync engine
changes a photo's status, instead of waiting for the 5s poll.
Also reduces background poll to 30s (just a fallback now), and revokes
stale ObjectURLs on each rebuild to prevent memory leaks.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
iOS Safari evicts Blob file-backed data from IndexedDB under memory
pressure, causing upload POSTs to throw 'Load failed' without ever
reaching the server. Two-pronged fix:
1. Store photos as ArrayBuffer (inline bytes) instead of Blob (file
reference) in IndexedDB — ArrayBuffers are not subject to eviction
2. Request navigator.storage.persist() to signal the browser not to
evict our storage under pressure
Also adds Storage.getBlob() helper for converting stored ArrayBuffer
back to Blob at upload/display time, with backward compat for any
existing Blob-stored photos.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
iOS Safari can evict blob data from IndexedDB while keeping the Blob
reference intact (instanceof/size checks pass but actual data read
fails). This caused upload POST to throw 'Load failed' client-side,
never reaching the server, burning retries endlessly.
Changes:
- Add validateBlobReadable() that reads first byte to verify data access
- If blob is unreadable, mark as 'failed' immediately with clear message
- Re-read photo from IndexedDB before upload for fresh blob reference
- Capture detailed error name/type in catch for better diagnostics
- Bump SW cache versions to v14/v10 to force new code delivery
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Offline-first photo capture app for Nextcloud with:
- Camera capture with continuous mode (auto-reopens after each photo)
- File browser with fullscreen image gallery, swipe navigation, and rename
- Upload queue with background sync engine
- Admin panel for Nextcloud user management
- Service worker for offline-first caching (v13)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>