offline navigations: replay exact-url navigations (7/13)#93631
Conversation
d32e3f4 to
4c7a23a
Compare
Failing test suitesCommit: c66e3d2 | About building and testing Next.js
Expand output● offlineNavigations build artifacts › registers the pass-through service worker when enabled
Expand output● app dir - prefetching › should immediately render the loading state for a dynamic segment when fetched from higher up in the tree Other failing CI jobs |
Stats from current PR🔴 1 regression, 1 improvement
📊 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: fff03ee |
89e51eb to
d4f5ace
Compare
4c7a23a to
58fead3
Compare
d4f5ace to
f979b1a
Compare
58fead3 to
bb5cc45
Compare
f979b1a to
f586a9b
Compare
bb5cc45 to
bd9034a
Compare
bd9034a to
fff03ee
Compare
f586a9b to
ca1a12e
Compare
fff03ee to
f5d5ccb
Compare
c37f337 to
19af8b5
Compare
f5d5ccb to
6aa4863
Compare
19af8b5 to
a0996c7
Compare
6aa4863 to
c9c1440
Compare
c9c1440 to
c41688b
Compare
c41688b to
4a20107
Compare
|
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. |
Stack Position
This is PR 7/13 in the compressed offline navigations stack. Chapter: Exact URL 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: #93632, #93634, plus exact-URL basics from #93639.
What This PR Does
What Works After This PR
After this PR, a same browser can replay an exact URL offline when a fresh compatible record already exists for that URL.
What Intentionally Does Not Work Yet
Request-sensitive replay policy, diagnostics, exact URL invalidation, and route-record reconstruction are still deferred.
Reviewer Focus
Exact URL cache keys, RSC payload serialization, fallback boot ordering, and fail-closed behavior when no exact record exists.
Proof in This PR
replays request-sensitive exact URLs from browser-private storageand exact URL shape coverage at the final tip.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
Eligibility hardening and invalidation are owned by PR 8/13. Route reconstruction is owned by PRs 9-13.