Skip to content

v1.0.4 — Media pipeline reliability

Choose a tag to compare

@theetaz theetaz released this 25 Apr 09:51
· 14 commits to main since this release

Highlights

  • 📷 Smaller, faster photo uploads. Photos are now resized to 1600 px on the long edge and recompressed at JPEG q 0.7 the moment you take them. Typical capture drops from ~1.3 MB to ~150–300 KB — 5–8× faster on cellular, no loss of AI usable detail.
  • 🌫 Blurhash placeholders. Photos now show an instant tinted placeholder while the image loads, so the grid no longer flashes empty tiles.
  • 🔁 Photos and clips appear after a fresh install. Reinstalling the app, switching devices, or clearing app data used to make photos and clips invisible even though the server still had them. Pull now hydrates anything missing locally. The "Sync all history" button covers media too, not just jobs.

Reliability fixes

  • Eliminated a sync race that could create duplicate `job_photos` rows when the engine triggered twice in the same second.
  • Job, photo, and clip pushes are now idempotent end-to-end via `client_id` + UNIQUE indexes on the server. A crash between the server INSERT and the local "synced" mark can no longer cause a duplicate on the next launch.
  • `runDataSync` is single-flight: concurrent triggers (foreground tick + connectivity recovery + realtime kick) share one in-flight pass.
  • One-shot hydration step on the first sync after this build resets the photo/clip cursors so the new pull-INSERT path can fill in any rows the device was missing.

Server-side companions (already live)

  • Storage RLS extended for admin reads on `job-photos` and `job-audio`.
  • `client_id` UNIQUE indexes on `jobs`, `job_photos`, `job_clips`.
  • `(job_id, storage_path)` / `(job_id, audio_path)` UNIQUE belt-and-braces.
  • Nightly orphan-storage cleanup cron at 03:10 UTC.
  • Admin-gated `backfill-photo-resize` edge function for one-shot reprocess of legacy oversize photos.

Audio recorder

  • Already at the floor for usable speech (16 kHz mono AAC at 32 kbps). No change needed.

Distribution

  • Build and ship the Android APK to Firebase App Distribution: `./deploy.sh --notes "Media pipeline reliability — see GitHub release v1.0.4"`