Ty
a83c9239ff
UAT-7: fix auto key selection — prefer key that removes more background
...
Root cause: auto selected the key with MORE kept pixels, which always
picked the green key (it keeps 100% of dark non-green backgrounds).
The black key correctly isolates the slab on dark surfaces.
Fix:
- auto now prefers the key with FEWER kept pixels (removed more bg)
when both are non-empty
- green key has a greenness pre-filter: non-greenish pixels pass
through (kept) so the black key can handle them, instead of the
green key keeping 100% of a dark surface
- added 3 regression tests: dark-bg auto selection, green-sheet auto
selection, green-key passthrough on non-green surfaces
106/106 unit tests green.
2026-09-14 07:41:51 -07:00
Ty
b124450d0c
M1-5: Measure + PNG + full capture UI (TDD)
...
- measure.js: sampleWidthsPx scanline sampler
- inventory.js: prepareInventoryMetadata
- +page.svelte: full 4-state capture flow (Add photo, Mask, Axis, Measure)
- Canvas overlay: checkerboard mask, bounding rect, axis line
- Inventory PNG: 3:4 portrait, slab centered 80% fill, alpha
- 77/77 unit tests green
2026-09-14 02:11:28 -07:00
Ty
0284a2211a
M1-4: Length axis (TDD)
...
- Add axis.js: length axis rectangle state, 28 tests
- 71/71 unit tests green
2026-09-14 00:32:42 -07:00
Ty
7e2a1845cf
M1-3: Capture + Mask state (TDD)
...
- Add maskState.js: sheet Auto/Green/Black, sensitivity, edge offset, feather
- Overlay = slab photo + checkerboard on removed px
- Debounced recompute 2.0s after last sensitivity change
- Approve blocked when maskStats empty
- HEIC shows retake notice
- Refactored mask.test.js + extended e2e mask.spec.js
- 43/43 unit tests green
2026-09-14 00:02:36 -07:00
Ty
dd011207a0
feat(m1-2,m1-3): deterministic core + mask keying (TDD, green)
...
Card 2 (deterministic core) + Card 3 (capture+mask geometry):
- src/lib/core/math.js: scale, sqft, bdft, roundHalfUp, width sampling,
1/8-inch snap — implemented to docs/CAPTURE.md identities.
- src/lib/core/mask.js: keySheet green/black/auto chroma keys + maskStats.
- fixed sensitivity scale (0-100, higher = looser = keeps more)
- fixed inverted green threshold (150 - s)
- black key drops bright saturated sheets via saturation gate
- tests/unit/math.test.js: corrected 3 wrong expected values to match the
spec (sqft 21x12in = 1.75 not 17.5; bdft 3.06; sample avg 11.25).
- tests/e2e/mask.spec.js: skeleton, skipped pending M1-5 live UI.
Full unit suite green: 24/24. E2e collects clean.
2026-09-13 23:17:36 -07:00
Ty
93666320ef
feat(m1-1): scaffold SvelteKit + Dockerfile + TDD test harness
...
- SvelteKit (JS, adapter-node) home page + /api/health route
- frontend/Dockerfile multi-stage build->serve (slabuploader-m1:local, 349MB)
- Test harness: Vitest unit + Playwright e2e; smoke tests RED->GREEN verified
- Build, image build, and image serve all verified
2026-09-13 22:55:34 -07:00