feat(capture): ship Milestone 1 browser capture app #57
Reference in New Issue
Block a user
Delete Branch "doc-simplification"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Phone and PC need one capture flow that ends at the inventory PNG and board-foot numbers. Milestone 1 stays in the browser with no backend, inference, or Woo create.
Scope
frontend/Vite+Svelte capture UI: Resume, Add photo, Mask, Length axis, Measurefrontend/Dockerfileserves static build via nginx (deploy/nginx-m1.conf)Tradeoffs
Vite+Svelte SPA instead of SvelteKit. Same static deploy shape, smaller scaffold for M1.
Blast Radius
New
frontend/tree and nginx fragment only. Olddeploy/docker-compose.ymlFastAPI stack is untouched and remains non-M1.Verification
sudo docker build -f frontend/Dockerfile -t slabuploader-m1 .sudo docker run -d --name slabuploader-m1 -p 0.0.0.0:18080:80 slabuploader-m1curl http://127.0.0.1:18080/returns 20013bfa792) b36e33e239Why Calculate showed accurate numbers but the inventory PNG kept the sheet background. Measure already uses approvedMask.bitset; encode did not. Scope Add composeInventoryFrame and inventory.test.ts alpha/crop proofs. Wire encodeInventoryPng({ bitmap, mask, source }) at calculate(). This commit still paints the slabBounds AABB without the bitset gate so the alpha contract fails until the follow-up fix. Verification node --import tsx --test src/png/inventory.test.ts alpha contract fails (sheet green leaks); 3:4 / 80% / floor pass.Inventory PNG mask + crop fix (Ty UAT 2026-09-14)
SHA:
fbcd05169f64bf50581aa430eaa17367bcfee2e5(ondoc-simplification)Why
After Calculate, measurements were accurate but the inventory PNG kept the sheet background.
encodeInventoryPngcropped the AABB from the raw photo and never appliedapprovedMask.bitset.Scope
composeInventoryFrameapplies bitset → alpha 0 for non-slab pixelsMARGINcalculate()passes{ bitmap, mask: approvedMask, source }inventory.test.tsalpha / crop / floor proofsVerification
cd frontend && npm test→ 12 passslabuploader-m1-overnighton http://100.64.0.9:10881 (bundleindex-BLPFL1gM.jsincludes bitset gate). Did not touch :10880 or :18080.UAT
Approve mask → axis → L/thickness → Calculate → confirm transparent background + 3:4/80% crop of the masked silhouette.
Landed on this branch: inventory PNG shorter-side floor 1600→800 (Ty UAT / Woo redo).
f20d84c(tests),44d428b(FLOOR + warn + CAPTURE.md)slabuploader-m1-overnightonly; :10880 untouched)Be=800, warn says800px floorTip-trim width sampling (
eaedcb5)Why. Ty UAT: width min/max described tips, not bulk.
Scope.
sampleWidthsnow keeps stations at 6, 12, … ≤ L−6 only. L≤12 → empty/zero. Tests inmeasure.test.ts. CAPTURE.md Widths bullet updated.Verification. npm test 17/17. Overnight rebuilt only at http://100.64.0.9:10881 from
eaedcb5. Tapered 48in repro: before min=2in (tips), after min=10in (bulk).UAT. Calculate on a tapered-tip slab; min/max/avg should ignore the first and last 6 in.
Pull request closed