Skip to content

Clear stale STEP model while new URL loads#928

Open
YunHeTracyLee wants to merge 1 commit into
tscircuit:mainfrom
YunHeTracyLee:codex/clear-stale-step-url-93
Open

Clear stale STEP model while new URL loads#928
YunHeTracyLee wants to merge 1 commit into
tscircuit:mainfrom
YunHeTracyLee:codex/clear-stale-step-url-93

Conversation

@YunHeTracyLee
Copy link
Copy Markdown

/claim #93

Summary

  • Clear StepModel's derived stepGltfUrl at the start of each new stepUrl load, so a previously converted STEP model is removed while the next STEP conversion is pending.
  • Add focused React coverage for switching from a cached STEP model to a new pending STEP URL.

Non-overlap

This is scoped to the STEP React lifecycle state for URL changes. It does not add or change STEP cache-key normalization, completed/blob reuse, temporary conversion resource disposal, generic load3DModel caching, GLTF lifecycle cleanup, OBJ/WRL loader behavior, or STL handling covered by existing PRs.

Validation

  • npx --yes bun test tests/step-model-url-change.test.tsx with bunfig.toml temporarily moved aside to bypass the repo-wide sharp/looks-same preload; focused test passed.
  • npx biome check src/three-components/StepModel.tsx tests/step-model-url-change.test.tsx
  • npx tsc --noEmit --pretty false
  • npm run build
  • npm run test:node-bundle
  • git diff --check

Local environment note

The default bun test preload imports looks-same/sharp; local dependencies were installed with scripts disabled, so the focused React test was run without the unrelated snapshot preload and bunfig.toml was restored afterward.

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

@vercel
Copy link
Copy Markdown

vercel Bot commented May 24, 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 24, 2026 2:39pm

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