fix(editor): honor millimeter notation across measurement panels - #823
fix(editor): honor millimeter notation across measurement panels#823FenjuFu wants to merge 2 commits into
Conversation
Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 09f18cf8-e5fe-4abf-a092-eb18f6599a93 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 41212e9. Configure here.
Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>

What does this PR do?
Fixes #374. Measurement property controls now read both
unitandmetricNotation, so millimeter mode displays and accepts millimeters while scene values remain in meters. Input hints, precision, and keyboard/drag increments use the displayed unit.The panel audit also found 178 meter-value props rounded before reaching the controls. Removing that repeated display rounding lets the controls format the original values: entering
2501 mmnow stores2.501 mand still displays2501 mmafter the panel rerenders.The shared controls cover the door, window, roof, column, slab, fence, and descriptor-driven inspectors. The mechanical migration spans 26 panel files; its AST checks verified that callbacks, bounds, steps, precision props, and non-meter controls were preserved. Per-control migration evidence.
How to test
2501. Verify the scene node stores2.501and the panel continues to show2501 mm.bun test ./packages/editor/src/lib/linear-display.test.ts.Validation completed: 5 unit tests with 72 assertions; 22 browser interaction checks; and an actual
RoofPanel/SliderControl/useSceneregression confirming the2501 mm → 2.501 m → 2501 mmround trip. Rendering the original panel against the same stored node reproduced2500 mm. The component browser setup isolates unrelated action/presentation wrappers; it is not a full editor E2E run. Configured Biome and whitespace checks passed; the two normally excluded UI-control files were formatted separately.Level-height badges also use the shared display precision: nine direct production-path checks passed for integer millimeters and the existing meter/foot readouts. Full fork CI for the current head passed the Linux quality pipeline (lint, skill checks, typecheck, full test suite and builds) and the macOS packed CLI/runtime smoke test. The validation workflow entry is isolated from this PR.
Screenshots / screen recording
Actual RoofPanel component regression: original panel · fixed panel.
Both screenshots use the same stored X position of
2.501 m.Checklist
bun dev(tested the actual components in Chromium; full application validation passed in CI)mainbranch