Skip to content

Alpha cloud check fixes: NVIDIA revolve naming, Design-mode code writes, Mac/Linux right-drag menu - #4

Open
RandoTechNerd wants to merge 4 commits into
alpha-integrationfrom
alpha-cloud-fixes
Open

RandoTechNerd wants to merge 4 commits into
alpha-integrationfrom
alpha-cloud-fixes

Conversation

@RandoTechNerd

Copy link
Copy Markdown
Owner

Fixes from a clean Linux cloud verification of alpha-integration (b4fec1d): npm ci, build:nvidia from source, the full suite, every catalog family built on both kernels (Rust and NVIDIA), and Design mode run in headless Chromium at 1600x900.

NVIDIA kernel (native/nvidia-kernel/adapter.cjs, revolve())

These were already wrong on nvidia-alpha.

  • Wall names landed on the wrong faces. A ring cup's outer wall was named after its inner wall, and a 270° block lost G101_RV. Each face's sample point is now swung back onto the profile's side of the axis.
  • A part turn of a ring was refused (SMLib status 1001). It now passes the closed loop alone.
  • A part turn of a clockwise profile swept the opposite way from Rust. The turn direction now follows which side of the axis the profile is on.
  • New test: test/nvidia.js compares each named face's r/z span and angle with Rust's on five revolves. 5 of them fail on the old code, 0 now.

Design mode

  • Press-pull on a size held in a const above the call (const w = 9 growing to 11) wrote uniontranslate(…, which is broken code (features.js).
  • Fillet/chamfer edge pick without segments: every edge borders the picked face, so all tied and the first edge always won. It now measures to the face across the edge (dialogs.js nearestEdge).
  • Rotate/scale gizmo: the merge-into-existing check never matched, so each release nested another wrapper. A turn about the same axis and pivot now merges; any other turn wraps outside (features.js).
  • Editing an existing sketch: on: P was written back as "XY" and named radii and coordinates as numbers. They are now kept as written until edited (sketch-model.js).
  • Dialog OK/Enter right after typing committed the previous preview. Confirmed in the browser: with the old code the fillet was lost. OK now builds what the fields say first (dialogs.js).
  • Ask about this: each pin started another requestAnimationFrame loop. Now there is one loop (index.html).
  • Revolve/Combine on a body with no call in the code threw a TypeError; they now show a message instead.
  • Feature dialogs now dispose their overlay materials and geometries on close.
  • Sketch Finish refuses when the code changed while the sketch was open, as press-pull already does, instead of silently undoing that change. Opening a feature dialog now closes an open sketch first.

Right-click menu on macOS and Linux (index.html)

Chromium fires contextmenu on press there, not on release as on Windows. The "it was a pan" check therefore never saw any movement, and every right-drag pan opened the shape menu. When the event arrives with the button still held, the menu now waits for the release and opens only if the pointer stayed put.

Verified

  • Full suite: 91 files, 14,704 passed, 0 failed (test/nvidia.js and test/sketcharcs.js against an addon built from source on Linux).
  • Repo UI checks in headless Chromium: phase 1 47/0, phase 3 33/0, phase 2 35/0 and Ask 26/0. Phase 2 and Ask pass only once the camera has settled; at the ~10 fps of software rendering a click can land mid-ease. That is test timing, not app behaviour.
  • Site build: node build-site.mjs --no-zip resolves every import.

Not in this PR

  • In Design mode the chat card opens under the Browser panel and the ribbon. That is a layout decision left to the author.
  • The Rust kernel refuses 7 catalog families that NVIDIA builds, including the new mini-monitor-easel. It falls back to the JS kernel, which takes about 4 s.

Generated by Claude Code

…of rings and clockwise profiles sweep as on Rust

A face's sample point can lie anywhere round a full turn. Swinging it back
on its own side of the axis put it on the mirror image of the profile, where
an outer wall lies nearer an inner one: a ring cup's outer wall came out
named after its inner wall, and G101 went missing from a 270-degree block.
The point now goes back on the profile's side, along the axis as drawn.

A part turn of a ring (profile clear of the axis) passed the stray axis line
in with the closed loop and SMLib refused it (1001); it now passes the loop
alone. SMLib turns about the axis line as drawn, so a clockwise profile (axis
edge running the other way) swept to +120 where Rust sweeps to -120; the turn
direction now follows the profile's side of the axis.

test/nvidia.js compares each named face's r/z span and angle against the
Rust kernel's for five revolves (5 failed before, 0 now).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGrpCLT8AW3vBotHJbhRwf
… turns fold, sketch edits keep names, OK builds what was typed, one Ask pin loop

- press-pull (features.js pressPullText): when the size number is a const
  above the call (const w = 9) and gains a digit, the compensating translate
  went in one character early ("uniontranslate("); the span start now
  shifts too, as boxCornerText does.
- fillet / chamfer edge pick without segments (dialogs.js nearestEdge): every
  edge shares the picked face, so all tied and the first one won; distance is
  now to the triangles of the face across.
- rotate / scale gizmo (features.js): shapeSpan hands over the rotate / scale
  itself, so the fold check never matched and every release nested another
  wrapper; a same-axis, same-pivot turn folds again, any other wraps outside.
- editing an existing sketch (sketch-model.js): on: P (a name) was written
  back as "XY" and named radii / coordinates as numbers; they now go back as
  written while untouched.
- feature dialogs: OK / Enter right after typing committed the previous
  preview; OK now builds the fields' current text first.
- Ask about this (index.html): each pin started another requestAnimationFrame
  loop; one loop now.

Tests in test/design.js for each (the edge pick, press-pull, fold and sketch
ones fail on the old code).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGrpCLT8AW3vBotHJbhRwf
Chromium on macOS and Linux sends contextmenu as the right button goes down,
before any drag (Windows sends it on the release), so the 'moved more than
6 px: it was a pan' check always saw no movement and the shape menu opened at
the start of every right-drag pan. When contextmenu arrives with the button
still held, the menu now waits for the release and opens only if the pointer
stayed put; Windows keeps the path it had.

Found by scripts/ask-check-run.cjs in headless Chromium on Linux ('a
right-drag (pan) opens no menu' failed); it passes now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGrpCLT8AW3vBotHJbhRwf
…pose their overlay, sketch Finish never undoes newer code

- revolve and combine dialogs passed a null body on to the text writers (a
  TypeError inside the async preview, so the dialog just went quiet); they
  now say the shape has no call in the code, as extrude / hole / fillet do.
- feature dialogs made two materials per open and a PointsMaterial per hole
  pick and never disposed them (nor the edge line geometries on close).
- sketch Finish wrote the code as it was when the sketch opened, so an edit
  made meanwhile was reverted without a word; it now refuses, as press-pull
  does, and opening a feature dialog closes an open sketch first (the
  sketcher took every pick, so the dialog could not get its own).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MGrpCLT8AW3vBotHJbhRwf
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.

2 participants