From 8ff008f85cac3417ced6cdac6f3a9cfbc7560613 Mon Sep 17 00:00:00 2001 From: grokbot_ty Date: Tue, 15 Sep 2026 21:14:16 +0000 Subject: [PATCH] feat(photos): keep M1 mask/axis/measure on calibration pick (#61) Document single-source M1 path after pickCalibration: Mask/Axis/Measure/ Calculate use the chosen Source only; batch siblings stay draft-untouched until #62 apply. Tag encode-fallback inventory Blob as image/png (CAPTURE.md). --- frontend/src/capture/session.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/capture/session.ts b/frontend/src/capture/session.ts index d421d25..03d0017 100644 --- a/frontend/src/capture/session.ts +++ b/frontend/src/capture/session.ts @@ -405,6 +405,7 @@ export function createCaptureSession(opts: SessionOpts = {}): CaptureSession { void persist(); }, + // #61: enter M1 Mask on the chosen calibration Source only — never loop batch. pickCalibration(index: number) { if (state.k !== 'pickCalibration') return; if (index < 0 || index >= state.photos.length) return; @@ -434,6 +435,7 @@ export function createCaptureSession(opts: SessionOpts = {}): CaptureSession { runPass(); }, + // #61: Axis uses the same calibration source; draft.batch siblings stay untouched. approveMask() { if (state.k !== 'mask' || !state.overlay || state.overlay.slabPx === 0) return; teardownWorker(); @@ -471,6 +473,7 @@ export function createCaptureSession(opts: SessionOpts = {}): CaptureSession { void persist(); }, + // #61: M1 Calculate on the calibration source only (batch apply is #62). async calculate() { if (state.k !== 'measure') return; const { source, approvedMask, axis, lengthEighths, thicknessEighths } = state; @@ -487,7 +490,8 @@ export function createCaptureSession(opts: SessionOpts = {}): CaptureSession { pngBlob = r.blob; belowFloor = r.sourceBelowFloor; } catch { - pngBlob = new Blob(); + // CAPTURE.md: inventory is image/png even when encode is unavailable. + pngBlob = new Blob([], { type: 'image/png' }); } bitmap.close(); if (pngUrl) URL.revokeObjectURL(pngUrl);