WFDASH-WEBAPP/src
Dave 9a28e99520 fix(collection-ai): read iPhone HEIC photos (they were skipped)
The first iPhone driver photos (Thabo, 2026-10-20, PO202610003TEL and
PO26100702STK) arrived as HEIC. The AI only takes JPEG/PNG/WebP/GIF, so
the reads were saved as "skipped — Not an image (.heic)" and Check with
AI kept answering 0 files read, 0 lines checked; skipped reads were never
retried.

- heic-to-jpeg.ts: HEIC/HEIF → JPEG with heic-convert (pure JS/WASM;
  sharp's prebuilt binaries can't decode HEVC HEIC), downscaled to 1600px
  like the PB thumb. defaultFetchFile uses it (PB has no HEIC thumbs).
- HEIC/HEIF count as readable images; a read an older version "skipped"
  for a now-readable type is re-read, and the tick treats it as unread.
- next.config: heic-convert / heic-decode / libheif-js are server
  externals (libheif's WASM loader uses a dynamic require).

Verified on the live photo: 1 MB HEIC → 315 KB JPEG in ~1 s, readable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 07:12:29 +02:00
..
app feat(collection-confirm): collected stock orders go through Collection Confirm 2026-10-19 17:03:33 +02:00
components feat(collection-confirm): Delete photo; drop the Run agent scan button 2026-10-19 14:26:10 +02:00
lib fix(collection-ai): read iPhone HEIC photos (they were skipped) 2026-10-20 07:12:29 +02:00
styles fix(pos): dead discount toggle + stale discount figure, lift dark palette 2026-10-12 23:17:57 +02:00
middleware.ts feat(tv): add TV dashboard + refine workflows 2026-08-13 20:55:22 +02:00
test-setup.ts