Unify appShells flag with Partial Prefetching#95415
Merged
Merged
Conversation
Contributor
Tests PassedCommit: a966875 |
Contributor
Stats from current PR🔴 1 regression, 4 improvements
📊 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 (25 files)Files with changes:
View diffsapp-page-exp..ntime.dev.jsfailed to diffapp-page-exp..time.prod.jsDiff too large to display app-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsDiff too large to display app-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsDiff too large to display app-page.runtime.dev.jsfailed to diffapp-page.runtime.prod.jsfailed to diffapp-route-ex..ntime.dev.jsDiff too large to display app-route-ex..time.prod.jsDiff too large to display app-route-tu..ntime.dev.jsDiff too large to display app-route-tu..time.prod.jsDiff too large to display app-route-tu..ntime.dev.jsDiff too large to display app-route-tu..time.prod.jsDiff too large to display app-route.runtime.dev.jsDiff too large to display app-route.ru..time.prod.jsDiff too large to display pages-api-tu..ntime.dev.jsDiff too large to display pages-api-tu..time.prod.jsDiff too large to display pages-api.runtime.dev.jsDiff too large to display pages-api.ru..time.prod.jsDiff too large to display pages-turbo...ntime.dev.jsDiff too large to display pages-turbo...time.prod.jsDiff too large to display pages.runtime.dev.jsDiff too large to display pages.runtime.prod.jsDiff too large to display server.runtime.prod.jsDiff too large to display 📎 Tarball URLCommit: a966875 |
acdlite
force-pushed
the
acdlite/remove-app-shells-flag
branch
from
July 16, 2026 15:57
7cee0d1 to
68ff8dc
Compare
App Shells was mostly a temporary kill switch in case we needed to quickly turn off the prefetch/render behavior that shipped alongside Cache Components. It's stable now, so remove the flag and inline every reference as if it were `true`, deleting the dead "off" branches. The one behavior that was incidentally gated on App Shells — the client's two-phase (Shell then Speculative) prefetch flow — should only apply when Partial Prefetching is on. Re-gate it on the route's SubtreeHasPartialPrefetching / SubtreeHasRuntimePrefetch hints, matching the server's anySegmentHasPartialPrefetchingEnabled, so client and server agree on which routes are "partial prefetching". Everything gated on partialPrefetching / PrefetchingMode.Partial is a separate system (despite the shared "shell" naming) and is untouched. Test configs drop their appShells overrides; the errors.json entry is left in place.
Under the removed appShells flag every cacheComponents route entered the
two-phase (Shell) client prefetch flow. It's now scoped to routes that opt
into Partial Prefetching. Update the affected fixtures/tests:
- prefetch-runtime: links use prefetch={true} so per-param runtime prefetches
still fire (auto links now only warm the reusable shell).
- prefetch-app-shell: fully-static routes opt into prefetch='partial' so their
shell is extracted/reused; static-shell assertions expect a single response
(the redundant runtime-shell prefetch no longer fires for fully-static
routes).
Runtime-prefetch links (allow-runtime routes) use prefetch={true} so the
per-request runtime prefetch still fires under the Partial-Prefetching-scoped
two-phase flow — an auto link now only warms the reusable shell.
The runtime-prefetch warning test needs a per-request runtime prefetch
(PPRRuntime) to fire. Opt the route into instant + keep prefetch={true} on the
link so the per-request prefetch still happens under the Partial-Prefetching-
scoped two-phase flow (an auto prefetch of an allow-runtime route now only
warms the reusable shell, which defers params and never hits the cache).
acdlite
force-pushed
the
acdlite/remove-app-shells-flag
branch
from
July 16, 2026 19:20
459aac7 to
a966875
Compare
acdlite
marked this pull request as ready for review
July 16, 2026 19:29
gnoff
approved these changes
Jul 16, 2026
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.
The experimental
appShellsflag was added while the feature was being developed. It was not meant to be a public-facing flag.Some of the behavior that was gated behind the
appShellsflag is purely an optimization and can be landed without any gate.There are also some behaviors that we don't want to turn on unless you've opted into the new prefetching model via Partial Prefetching. Arguably these too are internal optimizations, but because they can change the number of requests that are made to the server (e.g. one request for the shell, another for the page data), we will gate these behind Partial Prefetching to minimize the impact on existing applications.
The result is that until you opt into Partial Prefetching, you should not see any meaningfully detrimental impact to prefetching costs, regardless of how your app is structured.