Skip to content

Remove experimental.appShells flag#95415

Draft
acdlite wants to merge 1 commit into
canaryfrom
acdlite/remove-app-shells-flag
Draft

Remove experimental.appShells flag#95415
acdlite wants to merge 1 commit into
canaryfrom
acdlite/remove-app-shells-flag

Conversation

@acdlite

@acdlite acdlite commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

What

Removes the experimental.appShells feature flag entirely.

App Shells was mostly a temporary kill switch, in case we needed to quickly turn off the new prefetch/render behavior that shipped alongside Cache Components. The behavior is stable now, so this removes the flag and inlines every reference as if it were true, deleting the dead "off" branches.

The one behavior that moves instead of being deleted

appShells was also incidentally gating the client's two-phase prefetch flow (a Shell phase between RouteTree and Speculative). That behavior should only apply when Partial Prefetching is on, not whenever App Shells was enabled. This PR re-gates it on Partial Prefetching:

  • The client now enters the Shell phase (and skips the speculative concrete prefetch by default) only for routes whose route tree carries SubtreeHasPartialPrefetching or SubtreeHasRuntimePrefetch — i.e. routes that opted into Partial Prefetching globally (partialPrefetching config) or per segment (instant, prefetch: 'partial' | 'unstable_eager' | 'allow-runtime').
  • This mirrors the server's anySegmentHasPartialPrefetchingEnabled, so the client and server agree on which routes are "partial prefetching".

Everything gated on partialPrefetching / PrefetchingMode.Partial / shouldRenderWithAppShell was already a separate system (despite the shared "shell" naming) and is untouched.

Kill-switch inlining (behavior = flag always on)

  • Config: removed the appShells schema/type/serialization, the validation block, and the auto-enable-with-cacheComponents default (config.ts, config-schema.ts, config-shared.ts).
  • Build/runtime plumbing: removed __NEXT_APP_SHELLS define and the experimental.appShells render-opt threading (define-env.ts, base-server.ts, app-render/types.ts, templates/app-page.ts, templates/edge-ssr-app.ts, export/index.ts).
  • route-module.ts: segment-cache prefetches (isPrefetchRSCRequest) always count as prefetches.
  • response-cache/index.ts: a prefetch miss always runs its own generator instead of joining the batcher.
  • request/params.ts: static non-root params are always deferred out of the shell.
  • app-render.tsx: dropped the dead runtime-only RuntimePrerenderMode variant (only ever produced by the flag-off arms); shellByteLengthDeferred, collectedChunksByStage, and the /_shell segment are now always created/emitted.

Tests

Removed the appShells: true/false overrides from 11 test configs. The false ones relied on legacy single-phase behavior for observability — which they retain automatically, since those apps don't enable Partial Prefetching. CI will surface any that need follow-up migration.

Note

errors.json entry 1279 is left in place (append-only convention); the error is simply no longer thrown.

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.
@github-actions

github-actions Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Failing test suites

Commit: 7cee0d1 | About building and testing Next.js

pnpm test-start-experimental-turbo test/e2e/app-dir/segment-cache/vary-params/vary-params.test.ts (job)

  • segment cache - vary params > renders cached loading state instantly with runtime prefetching (DD)
  • segment cache - vary params > does not reuse prefetched segment when page accesses searchParams (DD)
  • segment cache - vary params > does not reuse prefetched empty-query segment for prefetches with searchParams (DD)
  • segment cache - vary params > shares cached segment across all params when none accessed statically (runtime prefetch) (DD)
  • segment cache - vary params > does not share cached segment when all params accessed statically (runtime prefetch) (DD)
  • segment cache - vary params > tracks metadata param access separately from body (runtime prefetch) (DD)
  • segment cache - vary params > tracks vary params per-segment with layout/page split (runtime prefetch) (DD)
Expand output

● segment cache - vary params › renders cached loading state instantly with runtime prefetching

Expected a response containing the given string:

Static content - Category: electronics

  156 |
  157 |     // Prefetch first link - static content fetched
> 158 |     await act(
      |           ^
  159 |       async () => {
  160 |         const toggle = await browser.elementByCss(
  161 |           'input[data-link-accordion="/runtime-prefetch/electronics/phone"]'

  at Object.act (e2e/app-dir/segment-cache/vary-params/vary-params.test.ts:158:11)

● segment cache - vary params › does not reuse prefetched segment when page accesses searchParams

Expected a response containing the given string:

Search params target - foo: 1

  220 |
  221 |     // Each prefetch triggers a new request (not cached)
> 222 |     await act(
      |           ^
  223 |       async () => {
  224 |         const toggle = await browser.elementByCss(
  225 |           'input[data-link-accordion="/search-params/target-page?foo=1"]'

  at Object.act (e2e/app-dir/segment-cache/vary-params/vary-params.test.ts:222:11)

● segment cache - vary params › does not reuse prefetched empty-query segment for prefetches with searchParams

Expected a response containing the given string:

Search params target - foo: undefined

  268 |     // Prefetch the no-query URL first. The page reads `foo` (a missing key),
  269 |     // which must register as a vary access.
> 270 |     await act(
      |           ^
  271 |       async () => {
  272 |         const toggle = await browser.elementByCss(
  273 |           'input[data-link-accordion="/search-params/target-page"]'

  at Object.act (e2e/app-dir/segment-cache/vary-params/vary-params.test.ts:270:11)

● segment cache - vary params › shares cached segment across all params when none accessed statically (runtime prefetch)

Expected a response containing the given string:

Loading all content dynamically

  583 |
  584 |     // First prefetch fetches the segment
> 585 |     await act(
      |           ^
  586 |       async () => {
  587 |         const toggle = await browser.elementByCss(
  588 |           'input[data-link-accordion="/runtime-prefetch-no-vary/electronics/phone"]'

  at Object.act (e2e/app-dir/segment-cache/vary-params/vary-params.test.ts:585:11)

● segment cache - vary params › does not share cached segment when all params accessed statically (runtime prefetch)

Expected a response containing the given string:

Static content - electronics/phone

  620 |
  621 |     // Each prefetch triggers a new request
> 622 |     await act(
      |           ^
  623 |       async () => {
  624 |         const toggle = await browser.elementByCss(
  625 |           'input[data-link-accordion="/runtime-prefetch-all-vary/electronics/phone"]'

  at Object.act (e2e/app-dir/segment-cache/vary-params/vary-params.test.ts:622:11)

● segment cache - vary params › tracks metadata param access separately from body (runtime prefetch)

Expected a response containing the given string:

Runtime Metadata: aaa

  707 |
  708 |     // First prefetch triggers a request including the metadata
> 709 |     await act(
      |           ^
  710 |       async () => {
  711 |         const toggle = await browser.elementByCss(
  712 |           'input[data-link-accordion="/runtime-prefetch-metadata/aaa"]'

  at Object.act (e2e/app-dir/segment-cache/vary-params/vary-params.test.ts:709:11)

● segment cache - vary params › tracks vary params per-segment with layout/page split (runtime prefetch)

Expected a response containing the given string:

Page category:

  742 |
  743 |     // First prefetch fetches page segment
> 744 |     await act(
      |           ^
  745 |       async () => {
  746 |         const toggle = await browser.elementByCss(
  747 |           'input[data-link-accordion="/runtime-prefetch-layout-split/electronics/phone"]'

  at Object.act (e2e/app-dir/segment-cache/vary-params/vary-params.test.ts:744:11)

pnpm test-start-experimental-turbo test/e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts (job)

  • runtime prefetching > can completely prefetch a page that is fully static (DD)
  • runtime prefetching > cache stale time handling > includes short-lived public caches with a long enough staleTime (DD)
  • runtime prefetching > cache stale time handling > includes public caches with cacheLife("seconds") (DD)
  • runtime prefetching > cache stale time handling > includes private caches with cacheLife("seconds") (DD)
  • runtime prefetching > cache stale time handling > omits short-lived public caches with a short enough staleTime (DD)
  • runtime prefetching > cache stale time handling > omits private caches with a short enough staleTime (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting cookies() (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting headers() (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting dynamic params (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting searchParams (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting a private cache (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting a quickly-expiring public cache (DD)
  • runtime prefetching > errors > should trigger error boundaries for errors that occurred in runtime-prefetched content (DD)
  • runtime prefetching > in a page > includes dynamic params, but not dynamic content (DD)
  • runtime prefetching > in a page > includes root params, but not dynamic content (DD)
  • runtime prefetching > in a page > includes search params, but not dynamic content (DD)
  • runtime prefetching > in a page > includes headers, but not dynamic content (DD)
  • runtime prefetching > in a page > includes cookies, but not dynamic content (DD)
  • runtime prefetching > in a page > can completely prefetch a page that uses cookies and no uncached IO (DD)
  • runtime prefetching > in a private cache > includes dynamic params, but not dynamic content (DD)
  • runtime prefetching > in a private cache > includes root params, but not dynamic content (DD)
  • runtime prefetching > in a private cache > includes search params, but not dynamic content (DD)
  • runtime prefetching > in a private cache > includes headers, but not dynamic content (DD)
  • runtime prefetching > in a private cache > includes cookies, but not dynamic content (DD)
  • runtime prefetching > in a private cache > can completely prefetch a page that uses cookies and no uncached IO (DD)
  • runtime prefetching > passed to a public cache > includes dynamic params, but not dynamic content (DD)
  • runtime prefetching > passed to a public cache > includes root params, but not dynamic content (DD)
  • runtime prefetching > passed to a public cache > includes search params, but not dynamic content (DD)
  • runtime prefetching > passed to a public cache > includes headers, but not dynamic content (DD)
  • runtime prefetching > passed to a public cache > includes cookies, but not dynamic content (DD)
  • runtime prefetching > passed to a public cache > can completely prefetch a page that uses cookies and no uncached IO (DD)
  • runtime prefetching > should not cache runtime prefetch responses in the browser cache or server-side > different cookies should return different prefetch results - in a page (DD)
  • runtime prefetching > should not cache runtime prefetch responses in the browser cache or server-side > different cookies should return different prefetch results - in a private cache (DD)
  • runtime prefetching > should not cache runtime prefetch responses in the browser cache or server-side > private caches should return new results on each request (DD)
Expand output

● runtime prefetching › in a page › includes dynamic params, but not dynamic content

Expected a response containing the given string:

Param: 123

  54 |
  55 |       // Reveal the link to trigger a runtime prefetch for one value of the dynamic param
> 56 |       await act(async () => {
     |             ^
  57 |         const linkToggle = await browser.elementByCss(
  58 |           `input[data-link-accordion="/${prefix}/dynamic-params/123"]`
  59 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:56:13)

● runtime prefetching › in a page › includes root params, but not dynamic content

Expected a response containing the given string:

Lang: en

  156 |
  157 |       // Reveal the link to trigger a runtime prefetch for one value of the root param
> 158 |       await act(async () => {
      |             ^
  159 |         const linkToggle = await browser.elementByCss(
  160 |           `input[data-link-accordion="/with-root-param/en/${prefix}/root-params"]`
  161 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:158:13)

● runtime prefetching › in a page › includes search params, but not dynamic content

Expected a response containing the given string:

Search param: 123

  268 |
  269 |       // Reveal the link to trigger a runtime prefetch for one value of the search param
> 270 |       await act(async () => {
      |             ^
  271 |         const linkToggle = await browser.elementByCss(
  272 |           `input[data-link-accordion="/${prefix}/search-params?searchParam=123"]`
  273 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:270:13)

● runtime prefetching › in a page › includes headers, but not dynamic content

Expected a response containing the given string:

Header: present

  364 |
  365 |       // Reveal the link to trigger a runtime prefetch for one value of the search param
> 366 |       await act(async () => {
      |             ^
  367 |         const linkToggle = await browser.elementByCss(
  368 |           `input[data-link-accordion="/${prefix}/headers"]`
  369 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:366:13)

● runtime prefetching › in a page › includes cookies, but not dynamic content

Expected a response containing the given string:

Cookie: initialValue

  422 |
  423 |       // Reveal the link to trigger a runtime prefetch for the initial cookie value
> 424 |       await act(async () => {
      |             ^
  425 |         const linkToggle = await browser.elementByCss(
  426 |           `input[data-link-accordion="/${prefix}/cookies"]`
  427 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:424:13)

● runtime prefetching › in a page › can completely prefetch a page that uses cookies and no uncached IO

Expected a response containing the given string:

Cookie: initialValue

  516 |
  517 |       // Reveal the link to trigger a runtime prefetch for the initial cookie value
> 518 |       await act(async () => {
      |             ^
  519 |         const linkToggle = await browser.elementByCss(
  520 |           `input[data-link-accordion="/${prefix}/cookies-only"]`
  521 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:518:13)

● runtime prefetching › in a private cache › includes dynamic params, but not dynamic content

Expected a response containing the given string:

Param: 123

  54 |
  55 |       // Reveal the link to trigger a runtime prefetch for one value of the dynamic param
> 56 |       await act(async () => {
     |             ^
  57 |         const linkToggle = await browser.elementByCss(
  58 |           `input[data-link-accordion="/${prefix}/dynamic-params/123"]`
  59 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:56:13)

● runtime prefetching › in a private cache › includes root params, but not dynamic content

Expected a response containing the given string:

Lang: en

  156 |
  157 |       // Reveal the link to trigger a runtime prefetch for one value of the root param
> 158 |       await act(async () => {
      |             ^
  159 |         const linkToggle = await browser.elementByCss(
  160 |           `input[data-link-accordion="/with-root-param/en/${prefix}/root-params"]`
  161 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:158:13)

● runtime prefetching › in a private cache › includes search params, but not dynamic content

Expected a response containing the given string:

Search param: 123

  268 |
  269 |       // Reveal the link to trigger a runtime prefetch for one value of the search param
> 270 |       await act(async () => {
      |             ^
  271 |         const linkToggle = await browser.elementByCss(
  272 |           `input[data-link-accordion="/${prefix}/search-params?searchParam=123"]`
  273 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:270:13)

● runtime prefetching › in a private cache › includes headers, but not dynamic content

Expected a response containing the given string:

Header: present

  364 |
  365 |       // Reveal the link to trigger a runtime prefetch for one value of the search param
> 366 |       await act(async () => {
      |             ^
  367 |         const linkToggle = await browser.elementByCss(
  368 |           `input[data-link-accordion="/${prefix}/headers"]`
  369 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:366:13)

● runtime prefetching › in a private cache › includes cookies, but not dynamic content

Expected a response containing the given string:

Cookie: initialValue

  422 |
  423 |       // Reveal the link to trigger a runtime prefetch for the initial cookie value
> 424 |       await act(async () => {
      |             ^
  425 |         const linkToggle = await browser.elementByCss(
  426 |           `input[data-link-accordion="/${prefix}/cookies"]`
  427 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:424:13)

● runtime prefetching › in a private cache › can completely prefetch a page that uses cookies and no uncached IO

Expected a response containing the given string:

Cookie: initialValue

  516 |
  517 |       // Reveal the link to trigger a runtime prefetch for the initial cookie value
> 518 |       await act(async () => {
      |             ^
  519 |         const linkToggle = await browser.elementByCss(
  520 |           `input[data-link-accordion="/${prefix}/cookies-only"]`
  521 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:518:13)

● runtime prefetching › passed to a public cache › includes dynamic params, but not dynamic content

Expected a response containing the given string:

Param: 123

  54 |
  55 |       // Reveal the link to trigger a runtime prefetch for one value of the dynamic param
> 56 |       await act(async () => {
     |             ^
  57 |         const linkToggle = await browser.elementByCss(
  58 |           `input[data-link-accordion="/${prefix}/dynamic-params/123"]`
  59 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:56:13)

● runtime prefetching › passed to a public cache › includes root params, but not dynamic content

Expected a response containing the given string:

Lang: en

  156 |
  157 |       // Reveal the link to trigger a runtime prefetch for one value of the root param
> 158 |       await act(async () => {
      |             ^
  159 |         const linkToggle = await browser.elementByCss(
  160 |           `input[data-link-accordion="/with-root-param/en/${prefix}/root-params"]`
  161 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:158:13)

● runtime prefetching › passed to a public cache › includes search params, but not dynamic content

Expected a response containing the given string:

Search param: 123

  268 |
  269 |       // Reveal the link to trigger a runtime prefetch for one value of the search param
> 270 |       await act(async () => {
      |             ^
  271 |         const linkToggle = await browser.elementByCss(
  272 |           `input[data-link-accordion="/${prefix}/search-params?searchParam=123"]`
  273 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:270:13)

● runtime prefetching › passed to a public cache › includes headers, but not dynamic content

Expected a response containing the given string:

Header: present

  364 |
  365 |       // Reveal the link to trigger a runtime prefetch for one value of the search param
> 366 |       await act(async () => {
      |             ^
  367 |         const linkToggle = await browser.elementByCss(
  368 |           `input[data-link-accordion="/${prefix}/headers"]`
  369 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:366:13)

● runtime prefetching › passed to a public cache › includes cookies, but not dynamic content

Expected a response containing the given string:

Cookie: initialValue

  422 |
  423 |       // Reveal the link to trigger a runtime prefetch for the initial cookie value
> 424 |       await act(async () => {
      |             ^
  425 |         const linkToggle = await browser.elementByCss(
  426 |           `input[data-link-accordion="/${prefix}/cookies"]`
  427 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:424:13)

● runtime prefetching › passed to a public cache › can completely prefetch a page that uses cookies and no uncached IO

Expected a response containing the given string:

Cookie: initialValue

  516 |
  517 |       // Reveal the link to trigger a runtime prefetch for the initial cookie value
> 518 |       await act(async () => {
      |             ^
  519 |         const linkToggle = await browser.elementByCss(
  520 |           `input[data-link-accordion="/${prefix}/cookies-only"]`
  521 |         )

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:518:13)

● runtime prefetching › should not cache runtime prefetch responses in the browser cache or server-side › different cookies should return different prefetch results - in a page

Expected a response containing the given string:

Cookie: initialValue

  567 |
  568 |         // Reveal the link to trigger a runtime prefetch for the initial cookie value
> 569 |         await act(async () => {
      |               ^
  570 |           const linkToggle = await browser.elementByCss(
  571 |             `input[data-link-accordion="/${prefix}/cookies-only"]`
  572 |           )

  at act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:569:15)

● runtime prefetching › should not cache runtime prefetch responses in the browser cache or server-side › different cookies should return different

... truncated ...

pnpm test-start-experimental-turbo test/e2e/app-dir/segment-cache/prefetch-app-shell/prefetch-app-shell.test.ts (job)

  • App Shell prefetching > reuses the app shell across different param values so navigation to an unprefetched route is instant (DD)
  • App Shell prefetching > skips the per-link Speculative prefetch for a non-eager (allow-runtime) route (DD)
  • App Shell prefetching > extracts the App Shell from a fully-static prerender response (DD)
  • App Shell prefetching > root params > includes root params in a runtime App Shell (DD)
  • App Shell prefetching > root params > includes root params in a static App Shell (DD)
  • App Shell prefetching > root params > includes root params in a runtime App Shell when accessed via params object (DD)
  • App Shell prefetching > root params > includes root params in an App Shell when accessed via params object (DD)
  • App Shell prefetching > root params > uses separate runtime App Shells for links with different root params (DD)
  • App Shell prefetching > root params > uses separate static App Shells for links with different root params (DD)
Expand output

● App Shell prefetching › reuses the app shell across different param values so navigation to an unprefetched route is instant

The same expected substring was sent multiple times by the server:

App shell for posts

Choose a more specific substring to assert on.

  31 |     // prefetch, so under App Shells it prefetches only the shared shell;
  32 |     // the per-link Speculative prefetch is skipped.
> 33 |     await act(
     |           ^
  34 |       async () => {
  35 |         await browser
  36 |           .elementByCss('input[data-link-accordion="/posts/1"]')

  at Object.act (e2e/app-dir/segment-cache/prefetch-app-shell/prefetch-app-shell.test.ts:33:11)

● App Shell prefetching › skips the per-link Speculative prefetch for a non-eager (allow-runtime) route

The same expected substring was sent multiple times by the server:

App shell for posts

Choose a more specific substring to assert on.

  78 |     // Reveal /posts/1 (default/auto prefetch). The route is allow-runtime, which
  79 |     // is NOT eager, so under App Shells only the shared App Shell is prefetched.
> 80 |     await act(
     |           ^
  81 |       async () => {
  82 |         await browser
  83 |           .elementByCss('input[data-link-accordion="/posts/1"]')

  at Object.act (e2e/app-dir/segment-cache/prefetch-app-shell/prefetch-app-shell.test.ts:80:11)

● App Shell prefetching › extracts the App Shell from a fully-static prerender response

Expected sequence of responses does not match:

- Expected
+ Received

  Array [
    "App shell for static posts",
-   "App shell for static posts",
  ]

NOTE: Assertions are checked in order, so if an expectation is missing, it may have actually appeared earlier in the sequence than expected. Make sure the order is correct.

  261 |     // prerender that the client extracts a shell prefix from). Both
  262 |     // responses contain the "App shell for static posts" substring.
> 263 |     await act(async () => {
      |           ^
  264 |       await browser
  265 |         .elementByCss('input[data-link-accordion="/static-posts/1"]')
  266 |         .click()

  at Object.act (e2e/app-dir/segment-cache/prefetch-app-shell/prefetch-app-shell.test.ts:263:11)

● App Shell prefetching › root params › includes root params in a runtime App Shell

The same expected substring was sent multiple times by the server:

App shell for posts with root param: en

Choose a more specific substring to assert on.

  306 |       // prefetch, so under App Shells it prefetches only the shared shell;
  307 |       // the per-link Speculative prefetch is skipped.
> 308 |       await act(
      |             ^
  309 |         async () => {
  310 |           await browser
  311 |             .elementByCss(

  at Object.act (e2e/app-dir/segment-cache/prefetch-app-shell/prefetch-app-shell.test.ts:308:13)

● App Shell prefetching › root params › includes root params in a static App Shell

Expected sequence of responses does not match:

- Expected
+ Received

  Array [
    "App shell for static posts with root param: en",
-   "App shell for static posts with root param: en",
  ]

NOTE: Assertions are checked in order, so if an expectation is missing, it may have actually appeared earlier in the sequence than expected. Make sure the order is correct.

  371 |       // prerender that the client extracts a shell prefix from). Both
  372 |       // responses contain the "App shell for static posts" substring.
> 373 |       await act(async () => {
      |             ^
  374 |         await browser
  375 |           .elementByCss(
  376 |             'input[data-link-accordion="/with-root-param/en/static-posts/1"]'

  at Object.act (e2e/app-dir/segment-cache/prefetch-app-shell/prefetch-app-shell.test.ts:373:13)

● App Shell prefetching › root params › includes root params in a runtime App Shell when accessed via params object

The same expected substring was sent multiple times by the server:

App shell for page with root param: en

Choose a more specific substring to assert on.

  420 |       // The root param is available when the shell is prerendered, so it's
  421 |       // captured in the cached shell.
> 422 |       await act(
      |             ^
  423 |         async () => {
  424 |           await browser
  425 |             .elementByCss(

  at Object.act (e2e/app-dir/segment-cache/prefetch-app-shell/prefetch-app-shell.test.ts:422:13)

● App Shell prefetching › root params › includes root params in an App Shell when accessed via params object

The same expected substring was sent multiple times by the server:

App shell for page with root param: en

Choose a more specific substring to assert on.

  477 |       // and reads no request-time data in the shell, so its App Shell depends
  478 |       // only on the root param, which is captured in the cached shell.
> 479 |       await act(
      |             ^
  480 |         async () => {
  481 |           await browser
  482 |             .elementByCss(

  at Object.act (e2e/app-dir/segment-cache/prefetch-app-shell/prefetch-app-shell.test.ts:479:13)

● App Shell prefetching › root params › uses separate runtime App Shells for links with different root params

The same expected substring was sent multiple times by the server:

App shell for posts with root param: en

Choose a more specific substring to assert on.

  529 |       // prefetch, so under App Shells it prefetches only the shared shell;
  530 |       // the per-link Speculative prefetch is skipped.
> 531 |       await act(
      |             ^
  532 |         async () => {
  533 |           await browser
  534 |             .elementByCss(

  at Object.act (e2e/app-dir/segment-cache/prefetch-app-shell/prefetch-app-shell.test.ts:531:13)

● App Shell prefetching › root params › uses separate static App Shells for links with different root params

Expected sequence of responses does not match:

- Expected
+ Received

  Array [
    "App shell for static posts with root param: en",
-   "App shell for static posts with root param: en",
  ]

NOTE: Assertions are checked in order, so if an expectation is missing, it may have actually appeared earlier in the sequence than expected. Make sure the order is correct.

  630 |       // prerender that the client extracts a shell prefix from). Both
  631 |       // responses contain the "App shell for static posts" substring.
> 632 |       await act(async () => {
      |             ^
  633 |         await browser
  634 |           .elementByCss(
  635 |             'input[data-link-accordion="/with-root-param/en/static-posts/1"]'

  at Object.act (e2e/app-dir/segment-cache/prefetch-app-shell/prefetch-app-shell.test.ts:632:13)

pnpm test-start test/e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts (job)

  • runtime prefetching > can completely prefetch a page that is fully static (DD)
  • runtime prefetching > cache stale time handling > includes short-lived public caches with a long enough staleTime (DD)
  • runtime prefetching > cache stale time handling > includes public caches with cacheLife("seconds") (DD)
  • runtime prefetching > cache stale time handling > includes private caches with cacheLife("seconds") (DD)
  • runtime prefetching > cache stale time handling > omits short-lived public caches with a short enough staleTime (DD)
  • runtime prefetching > cache stale time handling > omits private caches with a short enough staleTime (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting cookies() (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting headers() (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting dynamic params (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting searchParams (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting a private cache (DD)
  • runtime prefetching > errors > aborts the prerender without logging an error when sync IO is used after awaiting a quickly-expiring public cache (DD)
  • runtime prefetching > errors > should trigger error boundaries for errors that occurred in runtime-prefetched content (DD)
  • runtime prefetching > in a page > includes dynamic params, but not dynamic content (DD)
  • runtime prefetching > in a page > includes root params, but not dynamic content (DD)
  • runtime prefetching > in a page > includes search params, but not dynamic content (DD)
  • runtime prefetching > in a page > includes headers, but not dynamic content (DD)
  • runtime prefetching > in a page > includes cookies, but not dynamic content (DD)
  • runtime prefetching > in a page > can completely prefetch a page that uses cookies and no uncached IO (DD)
  • runtime prefetching > in a private cache > includes dynamic params, but not dynamic content (DD)
  • runtime prefetching > in a private cache > includes root params, but not dynamic content (DD)
  • runtime prefetching > in a private cache > includes search params, but not dynamic content (DD)
  • runtime prefetching > in a private cache > includes headers, but not dynamic content (DD)
  • runtime prefetching > in a private cache > includes cookies, but not dynamic content (DD)
  • runtime prefetching > in a private cache > can completely prefetch a page that uses cookies and no uncached IO (DD)
  • runtime prefetching > passed to a public cache > includes dynamic params, but not dynamic content (DD)
  • runtime prefetching > passed to a public cache > includes root params, but not dynamic content (DD)
  • runtime prefetching > passed to a public cache > includes search params, but not dynamic content (DD)
  • runtime prefetching > passed to a public cache > includes headers, but not dynamic content ([DD](https://app.datadoghq.com/ci/test/runs?query=%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22+%40git.commit.head_sha%3A%227cee0d1815836ebcc0cd758647d80d0a39c58471%22+%40test.name%3A%22runtime+prefetching+passed+to+a+public+cache+includes+headers%2C+but+not+dynamic+content%22+%40test.type%3A%

... truncated to fit in one GitHub comment ...

@github-actions

github-actions Bot commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Stats cancelled

Commit: 7cee0d1
View workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant