diff --git a/frontend/src/capture/SessionCapture.svelte b/frontend/src/capture/SessionCapture.svelte index 7d29b65..c68ad85 100644 --- a/frontend/src/capture/SessionCapture.svelte +++ b/frontend/src/capture/SessionCapture.svelte @@ -70,6 +70,13 @@ let fileInput: HTMLInputElement; + // Auto-run the mask when entering the mask screen and whenever the sheet or + // sensitivity changes, so the overlay (and preview) is populated without the + // owner having to press Approve first. + $: if (kind === 'mask' && cap.source && cap.source.widthPx > 0) { + void session.approveMask(); + } + function pickFiles(e: Event) { const input = e.target as HTMLInputElement; if (!input.files) return; @@ -164,7 +171,9 @@ {/if} - {#if failed} + {#if overlay && overlay.slabPx === 0} +

No slab pixels detected — the mask removed everything. Lower the sensitivity, or set the sheet to match what the photo sits on, then retake if the shot is dark.

+ {:else if failed}

No slab pixels detected. Adjust controls or retake.

{:else if overlay}

Mask settled: {overlay.slabPx} slab pixels.