offline navigations: handle exact-url eligibility and invalidation (8/13)#93635
Conversation
7c94f4e to
a3ce0dc
Compare
Failing test suitesCommit: 895dca0 | About building and testing Next.js
Expand output● prefetch={true} with instant route › also disables full prefetch when instant is on a layout, not the page
Expand output● app dir - prefetching › should immediately render the loading state for a dynamic segment when fetched from higher up in the tree |
a3ce0dc to
bb27bb1
Compare
936921f to
a0ef135
Compare
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: bb27bb1 |
a0ef135 to
030442d
Compare
4cc41fa to
9b07bdd
Compare
030442d to
510565d
Compare
9b07bdd to
bda79e8
Compare
bda79e8 to
18c8903
Compare
18c8903 to
6871f45
Compare
fff03ee to
f5d5ccb
Compare
6871f45 to
8b0c282
Compare
f5d5ccb to
6aa4863
Compare
12d8027 to
0d3dba8
Compare
6aa4863 to
c9c1440
Compare
0d3dba8 to
9cc3d21
Compare
c9c1440 to
c41688b
Compare
9cc3d21 to
c66e3d2
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 8/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: #93636, #93637, #93638, plus remaining exact-URL coverage from #93639.
What This PR Does
What Works After This PR
After this PR, exact URL replay is the first usable client behavior: fresh compatible records replay, unsupported or invalid records visibly miss, and invalidated records are unreachable.
What Intentionally Does Not Work Yet
A route that was prefetched but never loaded as an exact URL still cannot be reconstructed offline.
Reviewer Focus
Eligibility rules, diagnostics, request-sensitive semantics, freshness/schema/build guards, and exact URL invalidation.
Proof in This PR
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
Persistent route, segment, and head records start in PR 9/13.