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);