offline navigations: add gated build primitives (1/13)#93622
Closed
feedthejim wants to merge 1 commit intocanaryfrom
Closed
offline navigations: add gated build primitives (1/13)#93622feedthejim wants to merge 1 commit intocanaryfrom
feedthejim wants to merge 1 commit intocanaryfrom
Conversation
Contributor
Tests PassedCommit: f0fc5c0 |
This was referenced May 8, 2026
e71544b to
dfc196e
Compare
dfc196e to
09d264c
Compare
This was referenced May 8, 2026
This was referenced May 8, 2026
09d264c to
fb4256d
Compare
This was referenced May 8, 2026
Contributor
Stats from current PR✅ No significant changes detected📊 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 (1 file)Files with changes:
View diffsserver.runtime.prod.jsDiff too large to display 📎 Tarball URLCommit: fb4256d |
fb4256d to
f0fc5c0
Compare
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 1/13 in the compressed offline navigations stack. Chapter: Build artifacts and worker boundary.
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: #93623.
What This PR Does
experimental.offlineNavigationsgate.cacheComponentsand impliesexperimental.useOfflineso the feature can land dark.What Works After This PR
After this PR, canary users are unaffected unless the experimental flag is enabled with cache-components. The config layer rejects unsupported combinations before any client behavior exists.
What Intentionally Does Not Work Yet
No fallback manifest, fallback document, service worker, Cache Storage entry, IndexedDB persistence, or offline replay exists yet.
Reviewer Focus
Config shape, flag naming, canary safety, and whether the flag boundary is the right foundation for the rest of the stack.
Proof in This PR
pnpm exec jest --runInBand packages/next/src/server/config.test.ts packages/next/src/client/components/router-reducer/offline-navigation-cache.test.tspassed, includingexperimental.offlineNavigationsconfig tests.does not emit offline navigation artifacts when disabled, proving the flag remains dark when disabled.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
All generated artifacts and client behavior are intentionally deferred to later PRs.