Skip to content

[codex] Cache direct STL URL geometry loads#886

Open
newmattock wants to merge 1 commit into
tscircuit:mainfrom
newmattock:codex/cache-direct-stl-url-93
Open

[codex] Cache direct STL URL geometry loads#886
newmattock wants to merge 1 commit into
tscircuit:mainfrom
newmattock:codex/cache-direct-stl-url-93

Conversation

@newmattock
Copy link
Copy Markdown

@newmattock newmattock commented May 12, 2026

/claim #93

Summary

  • add a shared cache helper for direct STL URL geometry loads, keyed by a normalized URL that strips only cachebust_origin
  • return a cloned BufferGeometry per caller so component cleanup cannot dispose the cached template
  • wire the STLModel stlUrl path through the cache while leaving direct stlData parsing unchanged
  • clean touched-file Biome issues in STLModel

Non-overlap

The active PRs I found cover OBJ loader cache keys, GLTF/GLB loader caching, generic load3DModel URL detection, and the STEP-to-GLB path. This PR only touches the direct STLModel stlUrl geometry loading path.

Verification

  • bun test tests/load-cached-stl-geometry.test.ts
  • bunx tsc --noEmit
  • bunx biome check src/three-components/STLModel.tsx src/utils/load-cached-stl-geometry.ts tests/load-cached-stl-geometry.test.ts
  • git diff --check
  • bun run build
  • GitHub checks are green: format-check, Test Node Bundle Load, type-check, Vercel, and Vercel Preview Comments

AI-assisted with Codex; I reviewed the diff before submitting.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
3d-viewer Ready Ready Preview, Comment May 12, 2026 10:25pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant