Skip to content

Release v0.20.1 — audit correctness patch - #437

Merged
sobechestnut-dev merged 6 commits into
mainfrom
dev
Sep 2, 2026
Merged

sobechestnut-dev merged 6 commits into
mainfrom
dev

Conversation

@sobechestnut-dev

Copy link
Copy Markdown
Contributor

Promotes dev → main to cut v0.20.1, a focused correctness patch resolving the confirmed bugs from the 2026-09-01 audit (each with a regression test; no API changes):

  • capture() sRGB colour-space — controls.capture() / ModelViewer.capture() now return sRGB-correct colours (was linear/too-dark: #6d7176 → #272a2e). Verified in-browser. (gcode-renderer-three)
  • GeometryWorkerPool.dispose() no longer hangs an in-flight build. (gcode-renderer-three)
  • Parse-session double-cancel() idempotency — no more orphaned terminate backstop wedging a re-parse. (gcode-parser)
  • React <ModelViewer> disposes its controller on unmount (adapter parity). (gcode-preview-react)
  • <gcode-preview> applies initial view/pre-connect cameraState on connect + re-applies hidden-feature-roles after reconnect. (gcode-preview-element)

All 14 @chestnutlabs/* packages bump 0.20.0 → 0.20.1 (lockstep). Full package test suites green; pack:check, docs:release-check, and docs:links all pass. Deferred/related findings filed as #430–#435.

🤖 Generated with Claude Code

sobechestnut-dev and others added 4 commits August 30, 2026 19:21
…/gallery to the current UI

A documentation/demo/presentation parity pass against the shipped v0.20.0 product (no SDK API
changes). The README/Pages no longer advertise the pre-Feature-Lab control panel.

Live demos on GitHub Pages:
- tools/docs/build-demos.mjs (`npm run docs:demos`, wired into docs-pages.yml after docs:build):
  builds the Feature Lab + all four framework showcases/minimals and stages them into the Pages
  artifact under /demos/* on the published SDK, with a product-facing landing (labelled cards).
  Corpus pruned per demo; tools/docs/serve-site.mjs previews the built artifact locally.

Reproducible app-UI screenshots:
- tools/screenshots/capture-app.mjs + app-shots.manifest.json (`npm run docs:shots:app`): captures
  the actual Feature Lab application surface (studio-dark chrome) by compositing the render into the
  DOM. New/updated media: app-control-panel (lead controls shot), app-appearance (color modes),
  app-diagnostics (capabilities + getRenderStats; replaces the stale mid-grey diagnostics-panel),
  app-prepare (Prepare/source model).

README + Pages refresh:
- README leads with the Feature Lab UI + a "Try the live demo" link; adds a Prepare/Preview pairing
  and a controls/capabilities pairing; the framework table shows both viewers (GcodePreview + the
  /model ModelViewer); the toolpath-vs-model section documents the declarative model adapters; the
  beauty render is demoted to a supporting image.
- Pages homepage: primary "Try the live demo" CTA, app-UI hero, demos banner + Prepare/Preview card.
- Feature gallery: "Try it live — Prepare & Preview" section; model/framework sections updated for the
  /model adapters + demos; swapped stale diagnostics-panel for app-diagnostics.
- VISUAL_FEATURE_COVERAGE: records the resolved app-UI/demo gaps + the new harness.

Demo fix (presentation): the Feature Lab now applies its initial move-visibility state, so travel no
longer renders while "Travel moves" is unchecked. Demo multi-page build for the linked pages.

Release gate: the RELEASE_REVIEW Visual disposition now covers app-UI + live-demo parity, so a future
cut can't lead with a stale UI. docs:links OK (261).

Verified against the built docs-site served locally: homepage/gallery structure + links, all five
demos load and run on the published SDK, app-UI shots show the current UI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…matching the docs imagery

The Feature Lab and framework examples rendered their viewports on the studio-dark background while
every capability render in the README/docs sits on the neutral mid-grey documentation workspace, so
the app screenshots (hero + Prepare/Preview cards) looked like a different set. Put both viewers on
the same mid-grey (#6d7176) across all surfaces so the demos and the docs read as one product.

- demo-kit: new `theme.js` exporting `DOC_VIEWPORT_THEME` (toolpath `theme`) and `DOC_VIEWPORT_BG`
  (model `background`) — the one viewport look shared by the Feature Lab and the four showcases.
- Feature Lab: default the Scene → Theme to "Documentation grey"; the Prepare (model) viewport now
  shares the toolpath theme's background instead of a transparent canvas over the app chrome.
- Four showcases (React/Vue/Svelte/WC): pass DOC_VIEWPORT_THEME to <GcodePreview> and DOC_VIEWPORT_BG
  to <ModelViewer>/<gcode-model-viewer>. Minimals get a tiny inline theme/background (kept minimal).
- This is a demo/documentation preference only — the renderer still ships a transparent default and
  consumers keep full control of theming.

Two defects found and fixed while verifying:
- capture-app.mjs was compositing `controls.capture()`, whose render-to-target readback is in LINEAR
  colour space (no sRGB output encoding) and darkened the mid-grey to its linear value
  (#6d7176 → ~#272a2e). It now copies the LIVE sRGB-correct canvas (drawImage → toDataURL), the same
  technique capture.mjs uses for its full-DOM shots.
- Feature Lab: a toolpath parse settling just after a switch to Prepare re-showed stale toolpath
  overlays (count-pill / time) over the source model. onReady / onStateChange now gate those on the
  current mode, so Prepare stays clean (fixes it for live users too, not just the screenshots).

Regenerated the four app-UI shots (app-control-panel / app-appearance / app-diagnostics / app-prepare)
on the mid-grey. Verified every surface renders #6d7176: Feature Lab (Preview + Prepare), and React
showcase/minimal/model + the WC showcase (property path). Prettier + eslint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sion cancel, pool dispose, adapter lifecycle)

Fixes the confirmed correctness bugs from the 2026-09-01 audit, each with a regression test:

- gcode-renderer-three: capture() now renders the off-screen target in sRGB, so controls.capture()/
  ModelViewer.capture() return colours matching the canvas and renderStill (was linear/too-dark:
  #6d7176 → #272a2e). Verified in-browser (#6d7176 round-trips).
- gcode-renderer-three: GeometryWorkerPool.dispose() rejects in-flight requests so a dispose mid-build
  no longer hangs the streaming build's Promise.all.
- gcode-parser: cancel() is idempotent while a cancel is pending — a double cancel no longer orphans
  the terminate backstop (which could terminate a later parse and wedge the controller).
- gcode-preview-react: <ModelViewer>/useModelViewer disposes its controller on unmount (parity with
  the toolpath hook and the other adapters).
- gcode-preview-element: <gcode-preview> applies the initial `view`/pre-connect `cameraState` on
  connect, and re-applies `hidden-feature-roles` after a DOM reconnect.

Regression tests: capture sRGB target, pool dispose-mid-build, session double-cancel idempotency,
React model unmount disposal, WC initial-view + hidden-roles-reconnect. Full package suites green.

Deliberately NOT in this focused patch (filed separately): React onDisclosure stale-read (needs a
handle-API decision), a GcodePreviewState completeness guard, and the built-but-unwired feature
findings (capabilityHint, .bgcode thumbnail plumbing, model plate-selection demo/docs).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Consumes the five audit-fix changesets: all 14 @chestnutlabs/* packages 0.20.0 → 0.20.1 (patch,
lockstep). Stamps the version surfaces (README, docs/manual/index.md, docs/README.md "Current state"
+ release history), resolves RELEASE_REVIEW.md (correctness patch, no product/docs/visual change),
and updates the lockfile. docs:release-check PASS; docs:links OK (264).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Formatting-only. The file was added direct-to-dev (docs/demo parity pass) so it never went through
the PR lint gate; the v0.20.1 promotion PR's build job caught it. No behaviour change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e (AnyBridge)

Post-fix goldens for validating the capture() sRGB correction: capture-golden-grey.png (solid
#6d7176 background — round-trips exactly) + capture-golden-transparent.png (AnyBridge's exact
background:'transparent' call), produced through the real render-to-target capture() path by
tools/screenshots/capture-golden.mjs, plus a README with GPU-independent validation values
(background #6d7176 → #6d7176; was linear #272a2e) and the sRGB mapping.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sobechestnut-dev
sobechestnut-dev merged commit b785d99 into main Sep 2, 2026
7 checks passed
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.

1 participant