Skip to content

One-click test-piece download (F32): test-fit pieces in the Download files zip - #154

Merged
ntindle merged 1 commit into
mainfrom
poteto/test-fit-download-20261026-0710
Oct 26, 2026
Merged

ntindle merged 1 commit into
mainfrom
poteto/test-fit-download-20261026-0710

Conversation

@ntindle

@ntindle ntindle commented Oct 26, 2026

Copy link
Copy Markdown
Owner

What this ships

One-click download of the test-fit pieces (F32 🟡 → ✅). With Test fit first on, Download files now includes the test pieces:

  • stl/baseplate-1x1-x1.stl — the 1 × 1 baseplate, when the layout does not already have one (plus the edge spacer's STL when it is new)
  • 3mf/plate-0-test-fit.3mf — a first 3MF plate holding just the test pieces, listed first in the README
  • README gains a Test fit first: note naming the plate

Counts merge into the layout's STLs when the part already exists (a layout with a 1 × 1 baseplate gets baseplate-1x1-x2.stl, not a duplicate filename), and the main 3MF plates are unchanged — the test pieces are not double-counted across plates.

The switch state moved from PrintPlanCard's own hook into the shared settings (useGridfinitySettings, same gridfinity_testFit key, so existing users keep their setting) so the download follows it. The card takes testFit / onTestFitChange as props now.

Verification

Local gates on the branch worktree, all green:

  • npm test: 541 passed, 11 skipped (49 files)
  • npm run lint: clean (incl. no-comments rule)
  • npx tsc --noEmit: clean
  • npm run build: green, index chunk 227,799 → 228,122 B (+0.1%)

New tests: mergeTestFitParts (append vs count-bump, no-op), createPrintFiles with test fit on (zip contents, test-plate packing, merged counts, unchanged when off), card props + calculator-level persistence, and an end-to-end calculator test that the downloaded zip contains plate-0-test-fit.3mf and baseplate-1x1-x1.stl when the switch is on.

Perf (branch vs trunk, same box, node scripts/measure.mjs --n=15 --lh=3)

Metric Branch Trunk
Parity 45.0% (21 ✅ + 3 🟡 / 50) 44.0%
Lighthouse perf 71 74
TTI 3732 ms 3546 ms
Input-to-preview (median) 49.5 ms 41.4 ms
Layout task 4 steps, 565 ms 4 steps, 535 ms
Export task supported supported
Share task 1 click, 102 ms 1 click, 86 ms

No credible regression: a reversed-order re-run gave Lighthouse 69 vs 68, TTI 3885 vs 3951 ms, layout 551 vs 552 ms, share 85 vs 94 ms; an --n=30 --lh=1 pair gave input-to-preview 34.5 vs 33.2 ms, layout 481.5 vs 493.5 ms, share 81 vs 84 ms — the n=15 input-to-preview gap did not reproduce at n=30. The diff touches no measured code path (drawer-width edit → preview piece list is unchanged; the new work is one extra persisted settings key, a prop pass-through, and export code behind a lazy import() that only runs on download).

Notes

  • The card's Copy list still shows the test pieces as separate lines when the layout already has a 1 × 1 baseplate (it merges by key; the test baseplate carries its own key). The zip README merges them into one count line because zip filenames cannot duplicate. The totals agree (11 parts in both).
  • The tiny-bed (<42 mm usable) corner from the Test fit first switch in the Print plan card (F32) #150 review is unchanged: planPlates still throws during render for the test plate there, same as the pre-existing main-plates path. Follow-up guard, not this slice.
  • Feature map refreshed 2026-10-26: andymai 4.523.1 (2026-10-25, 3MF multi-color fix) and 4.523.2 (2026-10-26, lid slider, design-linking quick export, split-bin seam gap) — all bin-designer/export-side, no planner-row impact; gridfinity-label-generator still 3.1.1; automaat still v0.6.0; no new tool.

Lane B

Awaiting Netlify deploy preview verification (core tasks + test-fit download) before merge.

@netlify

netlify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for gridfinity-drawer-planner ready!

Name Link
🔨 Latest commit b2d5746
🔍 Latest deploy log https://app.netlify.com/projects/gridfinity-drawer-planner/deploys/6adf4858276be9a81226fc1d
😎 Deploy Preview https://deploy-preview-154--gridfinity-drawer-planner.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…files zip

With the Test fit first switch on, Download files now includes the
test pieces: the 1 x 1 baseplate STL (plus the edge spacer STL when the
layout does not already have one) and a first 3MF plate,
3mf/plate-0-test-fit.3mf, listed first in the README. Counts merge into
the layout's STLs when the part already exists, so no filename ever
duplicates. The switch state moved from the card into the shared
settings (same gridfinity_testFit key), so the download follows it.

Feature-map F32 partial to shipped; parity 44.0% to 45.0%.
@ntindle
ntindle force-pushed the poteto/test-fit-download-20261026-0710 branch from d051a66 to b2d5746 Compare October 26, 2026 12:32
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

PR Quality Report 📊

Check Status
TypeScript ✅
ESLint ✅
Tests ✅
Build ✅

View detailed results

@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@b40345e). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/utils/export/exportFiles.ts 96.15% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #154   +/-   ##
=======================================
  Coverage        ?   93.64%           
=======================================
  Files           ?       68           
  Lines           ?     3416           
  Branches        ?     1025           
=======================================
  Hits            ?     3199           
  Misses          ?      196           
  Partials        ?       21           
Flag Coverage Δ
unittests 93.64% <97.29%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ntindle
ntindle merged commit 04e651c into main Oct 26, 2026
33 checks passed
@ntindle
ntindle deleted the poteto/test-fit-download-20261026-0710 branch October 26, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant