WFDASHDRIVER-APP/components
Dave efba1bbf2f fix(photos): downscale pickup photos client-side before upload
Every pickup-photo upload on 2026-10-12 failed: 86 of 86 attempts
came back `400 unexpected EOF`, median 7.6s, max 15.6s. The old
comment here blamed a PocketBase `image/*` mime-detection bug, which
was wrong on both counts — `order_item_attachements` has
mimeTypes=null, so nothing was checking the format. Go's multipart
parser was hitting end-of-body before the declared Content-Length
arrived: a 3-8MB Android camera file truncated in transit on mobile
data.

The office side never hit this because WFDASH re-encodes to
1200px/q70 in attachment-compressor.ts before storing. This adds the
same treatment on the driver side so both produce comparable images
(~150-300KB, sub-second transfer).

compressPhoto() never throws and never returns null — on any decode
failure it hands back the original file. Compression here is an
optimisation, not a correctness requirement, so it must never turn a
photo that might have uploaded fine into a hard error.
2026-10-14 16:12:37 +02:00
..
AreaGroup.tsx feat: popover stays above footer, partial collections must be justified 2026-08-02 22:58:08 +02:00
AuthProvider.tsx feat: initialize project with Next.js, TypeScript, and Tailwind CSS 2026-05-24 21:51:29 +02:00
BottomNav.tsx feat: add complete dark mode support with settings toggle 2026-07-07 18:28:19 +02:00
CollectionItemCard.tsx feat: popover stays above footer, partial collections must be justified 2026-08-02 22:58:08 +02:00
CollectionMap.tsx feat: add pickup proof photos, improve performance and UX 2026-07-07 20:43:17 +02:00
CollectModal.tsx fix(photos): downscale pickup photos client-side before upload 2026-10-14 16:12:37 +02:00
InstallPrompt.tsx feat: add pickup proof photos, improve performance and UX 2026-07-07 20:43:17 +02:00
ItemDetailModal.tsx feat: add PO/Notes popovers, supplier color sidebar, fix popover clipping 2026-08-02 21:38:38 +02:00
LocationTracker.tsx feat: add order item photo uploads and fix PB bugs 2026-07-08 01:35:26 +02:00
OfflineIndicator.tsx refactor(ui): rebrand app, fix supplier naming 2026-07-05 22:32:20 +02:00
ProblemModal.tsx refactor(ui): rebrand app, fix supplier naming 2026-07-05 22:32:20 +02:00
PWABridge.tsx Add PWA support and UI redesign 2026-05-27 00:34:50 +02:00
SupplierGroup.tsx feat(grouping): add per-invoice grouping with bulk collect/problem 2026-08-12 08:04:26 +02:00