Repository navigation
Configurable estimate settings (F31 follow-up): material, price, and flow on the Print plan card - #156
Merged
Conversation
…flow on the Print plan card The Print plan card's rough-estimate line now follows the user's own filament: material (PLA/PETG/ABS), filament price ($/kg), and effective flow rate (mm3/s) in a settings popover on the card. The line shows the chosen material and the footnote states the active assumptions; the settings persist as gridfinity_estimateSettings and are local-only, not in share links. Defaults unchanged (PLA 1.24 g/cm3, $20/kg, ~8 mm3/s). estimatePrint takes the settings; sanitizeEstimateSettings validates stored values (unknown material falls back to PLA, price clamps to $1-200/kg, flow to 1-50 mm3/s). F31 stays green; parity unchanged at 47.0% (22 green + 3 partial / 50). Perf vs trunk: no credible regression (three same-day pairs; the first pair's load-metric gap flipped sign in the third pair, trunk alone swung Lighthouse 73 -> 77 -> 67). Feature map refreshed 2026-10-28: no competitor cell changes. F12/F44 blocked: drawer-preset research found only 1 of 7+ candidates verifiable from a primary manufacturer source; IKEA publishes overall dims only and Harbor Freight overall dims + volume only.
✅ Deploy Preview for gridfinity-drawer-planner ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
PR Quality Report 📊
|
Codecov Report❌ Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Configurable estimate settings (F31 follow-up slice, per
docs/wireframes/print-and-export.md): the Print plan card's rough-estimate line now follows the user's own filament instead of fixed assumptions.gridfinity_estimateSettingsin the shared settings, and are local-only — not in share links (liketestFit, so no share-format change)~4 h 2 min · ~144 g PLA · ~$2.88by default) and the footnote states the active assumptionsestimatePrint(parts, settings)takes the settings (default parameter keeps old call sites working);sanitizeEstimateSettingsvalidates stored values (unknown material → PLA, out-of-range numbers clamp, non-objects → defaults).Why this instead of drawer presets
F12 drawer presets were the first pick this run, but the research killed them: only 1 of 7+ candidates verifies from a primary manufacturer source — IKEA publishes overall dims only (interior dims are community-measured blogs with noted manufacturing variation) and Harbor Freight publishes overall dims + volume only, no interior W×D. The wireframe rule ("Every preset needs a
sourceURL for the inside dimensions; no guessed sizes") blocks shipping presets on those numbers, and a wrong preset prints a wrong baseplate. F44 examples are blocked by the same rule. Recorded in the feature-map honesty log and the backlog.Tests
npm test: 575 passed / 11 skipped (51 files, 13 new tests: settings scaling per material/price/flow, sanitize cases, popover interactions, card recompute)npm run lint,npx tsc --noEmit,npm run build: all green@/imports, zero added commentsPerf vs trunk (same box, local preview,
node scripts/measure.mjs)No credible regression: the first pair's load-metric gap reproduced in a reversed-order
--n=30 --lh=1pair (71 vs 77, 3732 vs 3499 ms) but flipped in a second--n=15 --lh=3pair (72 vs 67, 3743 vs 3972 ms) — trunk alone swung Lighthouse 73 → 77 → 67 and TTI 3665 → 3499 → 3972 ms across its three runs. Interaction metrics overlap in every pair. The diff touches no measured code path (drawer-width edit → preview piece list is unchanged; the new work is one persisted settings key, a popover that renders only when opened, and anestimatePrintcall that now takes the settings). Full numbers indocs/scoreboard.md.Bundle delta: index chunk 231,700 → 235,321 B (+1.6%); lazy export chunk unchanged (21,444 B).
Scores
Verification (for the reviewer / Lane B)
On the deploy preview, with the default 15×12in layout + Bambu Lab A1:
~4 h 2 min · ~144 g PLA · ~$2.88with the footnoteRough estimate — PLA at 1.24 g/cm³, $20/kg, ~8 mm³/s.~4 h 2 min · ~147 g PETG · ~$2.95(same time, grams and cost move with density); set price $25 → cost updates; set flow 16 → time halves; reload → settings persist; Reset to defaults → back to PLA / $20 / 8.