fix(frontend): ignore stale blueprint loads after route changes - #148
fix(frontend): ignore stale blueprint loads after route changes#148ai-yang wants to merge 1 commit into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
Hi maintainers — this PR was opened before the new contribution-policy workflow was added. The production change is 23 changed lines; the deterministic regression test accounts for the remaining 238 lines. I rechecked current Would you prefer to keep the regression test under a If the current scope is acceptable, could you also approve the pending CI and Bonk PR Review workflows when convenient? Thank you. |
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