Repository navigation
fix(router-core): merge synchronous beforeLoad context before offering pending match - #9019
Conversation
…g pending match Signed-off-by: Trần Hoàng Tú <tuth@ominext.com>
🦋 Changeset detectedLatest commit: c70491b The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Fixes #9009
🎯 Changes
In
contextualize(packages/router-core/src/load-client.ts),options[7 /* onReady */]?.()previously ran before invokingbeforeLoad, allowing a route whosependingMshad already elapsed to offer itspendingComponenton the microtask before synchronousbeforeLoadoutput merged intomatch.context.offer?.()until aftermatch.contextmerges whenbeforeLoadreturns synchronously (!isAsync), while callingoffer?.()immediately after starting asyncbeforeLoad(isAsync), and on non-SUCCESS/catchexits (unless aborted)..changeset/sync-beforeload-pending-context.md('@tanstack/router-core': patch).packages/react-router/tests/issue-9009-pending-sync-beforeload-context.test.tsx.Verification
pnpm --filter @tanstack/router-core test:unit -- --run:139files,3,651passed (4expected fail,3skipped),Type Errors: no errorspnpm --filter @tanstack/react-router test:unit -- --run:99files,1,244passed (1skipped),Type Errors: no errorspnpm --filter @tanstack/vue-router test:unit -- --run:73files,1,020passed (1skipped),Type Errors: no errorspnpm --filter @tanstack/router-core test:eslint(0errors,25pre-existing warnings) &@tanstack/react-router test:eslint(0errors,100pre-existing warnings)pnpm --filter @tanstack/router-core test:types&@tanstack/react-router test:types: passed (ts56–ts70)pnpm --filter @tanstack/router-core test:build&@tanstack/react-router test:build: passed (publint --strict+attw)@tanstack/solid-router test:unitpassed21non-.tsxfiles (169type tests,Type Errors: no errors) on Windows Node 24, while.tsxfiles hit pre-existing Windows Vitest transformTypeErroronfile:///@solid-refresh.AI assistance disclosure: authored and verified with AI coding assistance; I have reviewed and tested the diff.
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit