offline navigations: reconstruct prefetched routes offline (11/13)#93646
Closed
feedthejim wants to merge 11 commits intofeedthejim/offline-navigations-hydrate-router-cachesfrom
Closed
Conversation
Contributor
Failing CI jobsCommit: 7875b0e | About building and testing Next.js |
b18a178 to
6caa377
Compare
2be5937 to
5566f16
Compare
6caa377 to
221b216
Compare
5566f16 to
a53b5ca
Compare
221b216 to
f670ded
Compare
a53b5ca to
61e7b42
Compare
Contributor
Stats from current PR🔴 1 regression
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (9 files)Files with changes:
View diffsapp-page-exp..ntime.dev.jsfailed to diffapp-page-exp..time.prod.jsfailed to diffapp-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsfailed to diffapp-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsfailed to diffapp-page.runtime.dev.jsfailed to diffapp-page.runtime.prod.jsfailed to diffserver.runtime.prod.jsDiff too large to display 📎 Tarball URLCommit: a936907 |
61e7b42 to
a936907
Compare
f670ded to
3507830
Compare
This was referenced May 8, 2026
This was referenced May 8, 2026
a936907 to
483e081
Compare
fafaefd to
729b785
Compare
29d0490 to
d3a3108
Compare
003cef8 to
5bdc788
Compare
d3a3108 to
9682004
Compare
5bdc788 to
5d7a3d7
Compare
9682004 to
235cdb4
Compare
5d7a3d7 to
3912e67
Compare
235cdb4 to
2b33f40
Compare
2b33f40 to
a05b5dc
Compare
Contributor
Author
|
Closing this draft because the stack was compressed into the router-cache based 10-PR sequence. The exact-url replay slice was removed; reconstruction now lands in the fallback bootstrap PR. |
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.
Stack Position
This is PR 11/13 in the compressed offline navigations stack. Chapter: Router record replay.
Review guide: https://gist.github.com/feedthejim/b3d9fe26a7c05655fd57adcce371b93d
Full Stack
Context
The original offline navigations work was split into 25 staging PRs, which made the review surface too noisy. This compressed stack keeps the same first-usable feature at the tip, but groups the work by reviewer-facing behavior: build artifacts first, exact URL replay next, then route-record replay and invalidation.
The architecture boundary is intentional: the generated service worker keeps the app bootable by serving the fallback document, while the cache-components client router owns IndexedDB, replay eligibility, route reconstruction, visible misses, and invalidation.
Folded source PRs: None.
What This PR Does
What Works After This PR
After this PR, a fully prefetched route can hard-load offline even if its original HTML document was never loaded.
What Intentionally Does Not Work Yet
Dynamic route pattern matching is still limited until the next PR.
Reviewer Focus
The handoff from persisted records to router state, exact-URL miss fallback, and destructive missing-record coverage.
Proof in This PR
reconstructs a fully prefetched route from persisted router recordsand the missing head-record miss case.git diff --check canary..HEADpassed.git diff --stat HEAD f60949e313andgit diff --name-status HEAD f60949e313produced no output, so the compressed tip preserves the previous staging tip.pnpm --filter=next buildpassed.NEXT_TEST_MODE=start pnpm testheadless test/production/app-dir/offline-navigations/offline-navigations.test.tspassed, 12/12.IS_WEBPACK_TEST=1 NEXT_TEST_MODE=start pnpm testheadless test/production/app-dir/offline-navigations/offline-navigations.test.tspassed, 12/12.Deferred Coverage
Known dynamic route patterns are owned by PR 12/13.