Skip to content

refactor: deep housekeeping for /internal boundaries, lifecycle teardown, core barrel, and monoliths - #96

Merged
alowpoly merged 6 commits into
mainfrom
housekeeping-deep-cleanup
Dec 4, 2026
Merged

alowpoly merged 6 commits into
mainfrom
housekeeping-deep-cleanup

Conversation

@alowpoly

@alowpoly alowpoly commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Deep pre-0.3.0 housekeeping across packages/core, packages/polycss, packages/react, packages/vue, website, and CI guards:

  1. Fence adapter plumbing behind @layoutit/polycss/internal (30eb3e78, 4bdbfb5e):
    • Split internal React/Vue adapter plumbing off the public @layoutit/polycss/runtime subpath into @layoutit/polycss/internal, leaving public APIs (pointInMeshElement, GizmoMode) on /runtime and root index.
    • Enforced /internal boundaries in check-boundaries.mjs (blocked outside react and vue), pinned packages/{react,vue} to lockstep "@layoutit/polycss": "workspace:*", and added a fail-closed check-packs.mjs guard against .d.ts leaks and non-exact lockstep dependencies.
  2. Lifecycle & teardown hardening (12461a7d, 4bdbfb5e):
    • Cancel active window drag/pointer listeners, rAF loops (including re-entrant pause()/resume() inside listeners), blob URLs, and weak/element caches on teardown across controls, gizmos, <Poly>, and custom elements.
    • Guarded <Poly> pagesReady updates to atlas leaves and actual style mutations (eliminating React act(...) warnings).
  3. Slim @layoutit/polycss-core public barrel (3fa10da7):
    • Un-exported 116 internal symbols from the root barrel and pruned dead atlas helpers (verified 0 consumers across the monorepo).
  4. Decompose 4 core monoliths (082c3bbb):
    • Split optimizePolygons, computeReceiverShadows, parseGltf, and seamRepair into 21 acyclic internal submodules with 0 byte diffs verified against main across 8 GLB fixtures, shadows, and seam repair.
  5. Decompose website workbench components (86572322, 4bdbfb5e):
    • Split workbench god components, pruned dead builder helpers, removed /internal imports from website/, and fixed stableDomForMesh effect dependencies in useVanillaSceneHelpers.

Release Note

Because this PR slims public exports in @layoutit/polycss-core and @layoutit/polycss/runtime, the next npm release after merging must use bump=minor (0.3.0), not patch.

Verification

  • pnpm verify (all guards, 8 package test suites, build:packages, typecheck, check:ir, check:packs, bench:build, examples/*)
  • pnpm test:coverage (all 8 packages)
  • pnpm bench:gate:lifecycle (13/13 SSR + Chromium StrictMode/Vue lifecycle checks)
  • pnpm bench:gate:ci (Firefox 27/27 at 0 px, Chromium parity + strict) and pnpm bench:gate:perf
  • website Astro build (23 pages) + test:domformat-tools (2/2)

@alowpoly alowpoly closed this Dec 4, 2026
@alowpoly alowpoly reopened this Dec 4, 2026
@alowpoly
alowpoly merged commit fe862ec into main Dec 4, 2026
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