Repository navigation
[Maintainer] i18n: locale-neutral reference-scale label and half-away-from-zero rounding - #1164
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7c6c32957
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const factor = 10 ** precision | ||
| return Math.round((value + Number.EPSILON) * factor) / factor | ||
| return ( | ||
| (Math.sign(value) * Math.round((Math.abs(value) + Number.EPSILON) * factor)) / factor |
There was a problem hiding this comment.
Avoid rounding values just below a negative midpoint up
When drag, wheel, or keyboard arithmetic produces a negative value immediately below a half boundary, adding Number.EPSILON to its absolute value can push it onto the boundary and round it away from zero even though the rendered value rounds toward zero. For example, at precision 1, -1.2499999999999998 is displayed by Intl.NumberFormat as -1.2, but this helper returns -1.3, so write-back can still disagree with the display and introduce an unintended step.
Useful? React with 👍 / 👎.
|
Tooling cross-review at f7c6c32: CHANGES REQUESTED CI is green on this SHA (quality, cli-smoke, Changed paths, ci), and Bugbot passed. The touched tests and the core schema tests pass locally (733/733), and What's fixed:
P1: this is a persisted scene-format change. P2:
Because this touches the schema, Security's written approval at the final SHA is required before merge, in addition to this review. |
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.
Reviewed by Cursor Bugbot for commit a6f8c1c. Configure here.
|
Tooling cross-review at 1a2d843: APPROVE All checks are green on this exact SHA (quality, cli-smoke, Changed paths, ci, Cursor Bugbot with no issues). The touched tests (8/8) and the core tests (6120/6120) pass locally.
This changes the persisted scene schema, so merging also needs Security's written approval at 1a2d843. |
|
Tooling cross-review at 9121db3: APPROVE I reviewed only the diff from 1a2d843. All checks are green on this exact SHA (quality, cli-smoke, Changed paths, ci, and Cursor Bugbot with no issues). The touched tests (11/11) and the core schema tests pass locally, and there are no new inline findings.
Merging still needs Security's written approval at 9121db3. |

What does this PR do?
Follows up on the Tooling findings from #1162 and its review of this PR:
labelalongside numericdisplayLengthanddisplayUnit. This keeps new scenes readable by published@pascal-app/core1.0.6, MCP, and CLI while allowing current viewers to format numeric labels with the active locale.m,cm,ft, orinare parsed and reformatted for the viewer locale; unrecognized labels remain unchanged.apps/editor/proxy.tsis unchanged.How to test
bun test packages/editor/src/components/editor/floorplan-panel.test.ts packages/editor/src/components/ui/controls/metric-control.test.ts.bun run ci.2,75 mdisplays as2.75 mwhile the persisted fallback label remains canonical English.-1.25writes and displays as-1.3, while-1.2499999999999998writes and displays as-1.2.Screenshots / screen recording
N/A — formatting and persistence correctness changes only.
Checklist
bun devbun checkto verify)mainbranchNote
Low Risk
Changes are limited to display formatting, optional schema fields, and backward-compatible label parsing; no auth or data-migration risk beyond existing guide scale references.
Reviewed by Cursor Bugbot for commit 9121db3. Bugbot is set up for automated code reviews on this repo. Configure here.