offline navigations: support dynamic route patterns (9/10)#93647
Draft
feedthejim wants to merge 1 commit intofeedthejim/offline-navigations-hydrate-router-cachesfrom
Draft
Conversation
Contributor
Tests PassedCommit: 8590387 |
2be5937 to
5566f16
Compare
50d10ce to
8c40fef
Compare
5566f16 to
a53b5ca
Compare
8c40fef to
eaa8ac0
Compare
a53b5ca to
61e7b42
Compare
eaa8ac0 to
35ab38b
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: 8590387 |
61e7b42 to
a936907
Compare
35ab38b to
0fbaa6d
Compare
This was referenced May 8, 2026
This was referenced May 8, 2026
a936907 to
483e081
Compare
0fbaa6d to
bf8d9a2
Compare
d3a3108 to
9682004
Compare
ddea272 to
b5a19ef
Compare
9682004 to
235cdb4
Compare
b5a19ef to
7875b0e
Compare
235cdb4 to
2b33f40
Compare
5d85f15 to
e4072ca
Compare
This was referenced May 10, 2026
a05b5dc to
ab7f2f7
Compare
e4072ca to
1e0e045
Compare
ab7f2f7 to
a9a70a6
Compare
1e0e045 to
6e85165
Compare
a9a70a6 to
bfb04d5
Compare
6e85165 to
74042cd
Compare
bfb04d5 to
a8eb471
Compare
74042cd to
88ef52f
Compare
a8eb471 to
ea85d06
Compare
88ef52f to
65e9655
Compare
65e9655 to
8590387
Compare
ea85d06 to
51b4120
Compare
8590387 to
84f5627
Compare
51b4120 to
00b5b5b
Compare
84f5627 to
f0d70ed
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 9 of 10. It widens offline replay from exact learned URLs to learned
dynamic route patterns.
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 adds route pattern support so a dynamic route can be recovered when the
router has learned the pattern and has the required persisted segment and head
records. This keeps dynamic replay in the router layer rather than teaching the
service worker about application routes.
What Works After This PR
An offline hard reload can recover a known dynamic route pattern when the needed
records are present. If a required dynamic segment record is missing, the app
shows a visible offline miss.
What Does Not Work Yet
This is still the first usable scope. It does not attempt a broad red-team
matrix for every dynamic request shape, output export behavior, or custom miss
UI.
Reviewer Focus
Please focus on whether dynamic pattern matching uses the existing route
semantics cleanly and whether missing dynamic data fails closed.
Proof in This PR
Dynamic route replay and missing dynamic segment misses are covered by:
HEADLESS=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
PR 10 adds the user-facing docs and examples. Broader advanced stress coverage
belongs in follow-up PRs once this reviewer-sized stack lands.