fix(frontend): ignore stale blueprint loads after route changes - #148
Open
ai-yang wants to merge 1 commit into
Open
fix(frontend): ignore stale blueprint loads after route changes#148ai-yang wants to merge 1 commit into
ai-yang wants to merge 1 commit into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
ai-yang
marked this pull request as ready for review
August 11, 2026 15:15
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.
Fixes #146
Summary
getBlueprint()callbacks after their route ID or RPC stub has been superseded.(id, rpcStub)that loaded it, so the old blueprint cannot flash during the first render of a new route.Without these guards, an older request could settle after the current request and overwrite the page. The URL and action handlers would then target the new blueprint ID while the UI displayed metadata from the old blueprint.
Regression coverage
The new component tests use controlled promises to verify that:
Test plan
pnpm --filter @gadgets/workshop-frontend test— 28 test files / 140 tests passedpnpm --filter @gadgets/workshop-frontend types:checkpnpm exec oxlint packages/workshop-frontend/src/BlueprintLandingPage.tsx packages/workshop-frontend/src/BlueprintLandingPage.test.tsxgit diff --check