Reset model fallback boundary when model URLs change#929
Open
Zhenvip wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Additional review notes for the
This should be non-overlapping with the earlier loader/cache fixes on #93 because it only targets boundary reset behavior after model URL changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resetKeytoThreeErrorBoundaryso captured loader errors can be cleared when the active model fallback source changes.Why
On current main, the fallback
ThreeErrorBoundaryis keyed only by component id and fallback index. If a model URL fails once and then changes to a valid replacement URL, the existing boundary can stay in its old error state and immediately skip/advance the new candidate instead of retrying that replacement model. That creates unnecessary fallback churn and can prevent recovered model loads from displaying./claim #93
Verification
bun test tests/model-fallback-boundary.test.ts-> 3 passnpx biome check src/AnyCadComponent.tsx src/three-components/ThreeErrorBoundary.tsx tests/model-fallback-boundary.test.ts-> no fixes/errorsnpx tsc --noEmit --pretty false-> exit 0npm run build-> exit 0npm run test:node-bundle-> exit 0git diff --check-> exit 0Full
bun testcurrently reports 27 passing tests and 3 unrelated existing failures on this checkout:tests/preprocess-circuit-json.test.ts: faux-board z expectations are 0.1 higher than current output.tests/outline-bounds.test.ts: expected older soldermask color string does not match the current rendered SVG color.AI-assisted with Codex; I reviewed the diff and local verification before submitting.