offline navigations: add gated build primitives (1/10)#93736
Draft
feedthejim wants to merge 1 commit intocanaryfrom
Draft
offline navigations: add gated build primitives (1/10)#93736feedthejim wants to merge 1 commit intocanaryfrom
feedthejim wants to merge 1 commit intocanaryfrom
Conversation
This was referenced May 10, 2026
Contributor
Tests PassedCommit: a30807a |
d9404d4 to
2d875f9
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 (3 files)Files with changes:
View diffspages-api.ru..time.prod.jsDiff too large to display pages.runtime.prod.jsDiff too large to display server.runtime.prod.jsDiff too large to display 📎 Tarball URLCommit: a30807a |
2d875f9 to
a30807a
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 of 10. It creates the gated build and config surface for
experimental.offlineNavigations; it does not make offline navigations work by itself.Review guide:
https://gist.github.com/feedthejim/a10f757cf07c5550f731adf2fcf1077b
Full Stack
offline navigations: add gated build primitives (1/10)offline navigations: generate fallback document artifacts (2/10)offline navigations: register pass-through worker (3/10)offline navigations: cache fallback and current-build assets (4/10)offline navigations: serve fallback document offline (5/10)offline navigations: add router-cache persistence primitives (6/10)offline navigations: persist cached router records (7/10)offline navigations: bootstrap fallback from router records (8/10)offline navigations: support dynamic route patterns (9/10)offline navigations: add docs and examples (10/10)What This Changes
This introduces the experimental flag plumbing and the first build helper for offline navigation fallback output. The important product shape is established here:
experimental.offlineNavigationsis gated behindcacheComponents.useOffline,cachedNavigations, andoptimisticRouting.What Works After This PR
Apps can opt into the flag and exercise the build/config validation path. This PR intentionally only sets up the minimal framework affordances needed by the later build-output PRs.
What Does Not Work Yet
There is no fallback document emitted yet, no service worker, no offline document recovery, and no client router replay.
Reviewer Focus
Please focus on the flag semantics, the
cacheComponentsrequirement, the implied experimental flags, and whether the build helper is small enough to be a clean foundation for the next slices.Proof in This PR
The config and build-output paths introduced here are covered by the stack-level verification:
pnpm --filter=next buildHEADLESS=true pnpm test-start-turbo test/production/app-dir/offline-navigations/offline-navigations.test.tsHEADLESS=true pnpm test-start-webpack test/production/app-dir/offline-navigations/offline-navigations.test.tsDeferred Coverage
Fallback document generation starts in PR 2. Service worker registration starts in PR 3. Runtime offline behavior starts in PR 5, and router-cache replay starts in PR 8.
Docs Status
The user-facing guide and config reference land in PR 10, after the full experimental behavior exists.