Skip to content

Fix signed-zero mesh welding and units-dialog Enter handling - #22

Closed
Greg-J wants to merge 1 commit into
CNCKitchen:mainfrom
Greg-J:fix/import-keyboard-and-signed-zero
Closed

Greg-J wants to merge 1 commit into
CNCKitchen:mainfrom
Greg-J:fix/import-keyboard-and-signed-zero

Conversation

@Greg-J

@Greg-J Greg-J commented Oct 31, 2026 •

Copy link
Copy Markdown

Two import edge cases can change the result despite equivalent coordinates or the user's focused control:

  • Welding treated +0 and -0 as different vertices. Two triangles sharing an origin produced five vertices instead of four when one origin used negative zero. Canonicalize zero in both the hash and stored comparison key, without changing the input or merging distinct nonzero coordinates.
  • The units dialog captured every Enter key as Open, including Enter on Cancel or a unit button. Preserve native activation for focused controls while keeping the default Enter shortcut and shielding the workspace behind the dialog.

Adds five welding regression cases and real-keyboard browser checks for Cancel, choosing inches, and Open. The new regressions were run against the original code and failed before the fixes.

Validation:

  • Production build passes.
  • Targeted geometry tests: 16 passed.
  • Import browser suite, including new keyboard regressions: passes in headless Chrome on macOS.
  • Built-app import/save/reopen/export smoke test: passes.
  • Full unit suite: 3,089 passed, 24 skipped (372 passing test files). Optional private-scan fixtures were not available.
  • All five agent browser checks pass after installing the separate mcp package dependencies.
  • Plugin-boundary and display-unit checks pass.
  • The full browser suite already fails on the unmodified checkout on this Mac in e2e-mesh-edits and e2e-reverse-body-tree. In the former, the shared field setter enters 9.995 when asked to replace 9.999 with 5. These pre-existing failures are outside this patch.

No new dependencies.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for the pull request. ScanRuler is dual-licensed (AGPL and commercial), which only works if its author may license every line of it, so a short Contributor License Agreement is needed once. You keep your copyright. To sign, reply with the sentence below exactly:


I agree to CLA.md


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@Greg-J

Greg-J commented Nov 1, 2026 via email

Copy link
Copy Markdown
Author

@CNCKitchen

Copy link
Copy Markdown
Owner

Thank you, Greg-J. Both of these are fixed in 0.10.0. The CLA isn't signed on this PR, so I couldn't merge it and wrote the fixes separately; the changelog credits you for both.

  • Signed zero: weldTriangleSoup now takes −0.0 as +0.0, so a corner written both ways welds into one vertex (c518e2b, with a test for the shared-edge case you describe).
  • Units dialog: Enter on a focused button is now that button's, so Enter with Cancel focused no longer opens the file (83ecd38). With the dialog open, the workspace behind it also no longer takes Enter, the view keys or a middle click.

Closing this as done. If you sign the CLA, I'd be glad to take your other open PRs as they are.

@CNCKitchen CNCKitchen closed this Nov 9, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants