From 5a1800df917c8945c2d6c89f487cc4c9839ee860 Mon Sep 17 00:00:00 2001 From: Ty Date: Mon, 21 Sep 2026 01:59:27 -0700 Subject: [PATCH] fix(review): #90 persist the dimension-overlay copy with its role MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Capture→Review upload filtered out the overlay (role !== 'overlay') and sent no role field, so the dimension-overlay copy was never stored and every photo defaulted to role=batch. Review then fell back to a stored /processed URL that had no dimensions drawn — the owner saw the overlay thumbnail without its measurements. Now upload the full lineup with the correct role, keeping the overlay's dimension-drawn blob as both original and processed. --- frontend/src/App.svelte | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 63cd5d6..1ea58f4 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -105,16 +105,22 @@ content_source: 'manual', client_rev: 0, }); - const pngItems = capture.lineup.filter( - (it) => it.kind === 'png' && it.role !== 'overlay', - ); + // #90 / REVIEW-5: persist the full lineup with correct roles so the Review + // strip matches in-memory blobs by role. The overlay is the dimension-drawn + // copy — it must be persisted (its blob already has the dimensions) and is + // the photo the owner sees with the measurement overlay. Excluding it (the + // old `role !== 'overlay'` filter) dropped the dimension copy from Review. + const pngItems = capture.lineup.filter((it) => it.kind === 'png'); for (let i = 0; i < pngItems.length; i++) { const it = pngItems[i]; await uploadPhoto(id, { photoId: uuid(), seq: i + 1, isCalibration: it.role === 'calibration', + role: it.role, original: it.blob, + // The calibration/batch PNGs have no separate processed variant; the + // overlay blob already carries the drawn dimensions. processed: it.blob, }); }