Repository navigation
fix(router-core): keep server loads pending until settled - #8740
BleedingDev wants to merge 8 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
🦋 Changeset detectedLatest commit: cd9c190 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 |
… into fix/upstream-server-load-only-20261017
d0fa985 to
5f32976
Compare
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd9c19070b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| : undefined | ||
| // A custom hook can start a load. Capture matches only after it settles. | ||
| if (router._serverLoads || router._serverLoadFailure) { | ||
| await waitForServerLoads(router, serverSsr, opts?.signal) |
There was a problem hiding this comment.
Abort server lanes omitted from the final snapshot
When an initial server lane returns deferred data and an onEnter or dehydration hook starts a successful reload, this second drain lets the reload replace the stored matches before serialization. The earlier lane still registered an onCleanup callback in load-server.ts, but that callback skips abortLane() when serialization of the final reload reports settled=true; consequently, a promise or resource tied to the earlier lane's public abort signal can continue indefinitely after the response. Track which lanes were actually dehydrated or abort superseded lanes before treating serialization completion as settlement.
AGENTS.md reference: packages/router-core/AGENTS.md:L4-L4
Useful? React with 👍 / 👎.
🎯 Changes
Why the change
Wait for every active server load before reporting idle or capturing hydration state so SSR returns the final route data or redirect.
Special things to note
cd9c19070bpassed all 9 focused dehydration regressions, TypeScript 5.6–7.0 and ESLint; hosted CI and the final performance comparison remain pending.Change outline
✅ Checklist
🚀 Release Impact
Summary by CodeRabbit