Commit Graph

4 Commits

Author SHA1 Message Date
grokbot_ty 83171fab6e fix(gate-b): drawMaskOverlay — cutout on checkerboard, no green overlay (#55)
Replace green overlay rendering with cutout-on-checkerboard preview:
- Slab pixels show actual photo RGB with mask-based alpha
- Removed background area shows 10px checkerboard (224/192 gray)
- Knob debounce from a1d4a96 preserved unchanged

Update Playwright test to assert checkerboard + slab pixels
visible, not green overlay avgAlpha.
2026-09-08 00:30:24 +00:00
grokbot_ty a1d4a96a0a gate-b: fix mask overlay opacity, auto-sheet fallback, and knob debounce
- drawMaskOverlay: reduce green overlay max alpha 140→80 (~31% opacity),
  lighten green from (0,200,0) to (60,220,60) so photo stays visible
- resolveSheet: when auto-detect is ambiguous, try both green and black
  sheet modes, pick whichever produces non-trivial slab area (1%-99%)
- Knob sliders: debounce full remask to 150ms; oninput redraws with
  previous mask (cheap), onchange triggers immediate full remask
- Add onDestroy cleanup for debounce timeout

Fixes: issue #55 — iPad mask preview nearly solid green, knobs laggy
2026-09-07 21:26:50 +00:00
grokbot_ty 17b6e6ccd6 fix(gate-b): Svelte 5 event directives + label/input association for Select Photos
- Add id='photo-file-input' to file input and for='photo-file-input' to label
- Convert on:change → onchange, on:click → onclick, on:input → oninput
  (Svelte 5 requires native DOM event properties, not on: directives)
- Add Playwright BVT suite confirming file selection → mask step advance
- Test image: 100x60 PNG with green border (hue=66°) and white interior
2026-09-07 19:38:46 +00:00
grokbot_ty 8d8b3a2ff1 Gate B: SvelteKit capture→mask→numbers→review UI with deterministic pipeline
- Scaffold SvelteKit app (svelte.config.js, vite.config.ts, app.html, app.d.ts)
- Build full capture flow: photo input → mask overlay + 4 knobs → axis overlay
  + rotation → length/thickness/SKU inputs → review + upload to /api/v1/slabs
- Uses existing lib/pipeline/* pure modules (mask, axis, units, crop, pricing, types)
- Uses existing validation/sku.ts for SKU validation
- Svelte 5 runes ($state, $effect, $derived) for reactive state
- Canvas-based rendering for mask overlay, axis visualization, and 3:4 crop preview
- Dockerfile updated for Vite production build with static Node server on :80
- All 54 existing tests pass, build succeeds
2026-09-07 18:53:35 +00:00