Skip to content

Conversation

@acdlite
Copy link
Contributor

@acdlite acdlite commented Jan 30, 2026

No description provided.

@nextjs-bot
Copy link
Collaborator

nextjs-bot commented Jan 30, 2026

Failing test suites

Commit: 9aa778f | About building and testing Next.js

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

  • layout sharing in non-static prefetches > full prefetches should omit layouts that were already prefetched with a full prefetch (DD)
  • layout sharing in non-static prefetches > segment-level prefetch config > does not unnecessarily use a runtime prefetch for sub-pages of runtime-prefetchable layouts (DD)
  • layout sharing in non-static prefetches > segment-level prefetch config > statically prefetches a fully-static page segment if all its runtime-prefetchable parents are available (DD)
  • layout sharing in non-static prefetches > segment-level prefetch config > uses a runtime prefetch for sub-pages of runtime-prefetchable layouts if requested (DD)
Expand output

● layout sharing in non-static prefetches › full prefetches should omit layouts that were already prefetched with a full prefetch

thrown: "Exceeded timeout of 120000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

  119 |   })
  120 |
> 121 |   it('full prefetches should omit layouts that were already prefetched with a full prefetch', async () => {
      |   ^
  122 |     // Prefetches should re-use results from previous prefetches with the same fetch strategy.
  123 |
  124 |     let page: Playwright.Page

  at it (e2e/app-dir/segment-cache/prefetch-layout-sharing/prefetch-layout-sharing.test.ts:121:3)
  at Object.describe (e2e/app-dir/segment-cache/prefetch-layout-sharing/prefetch-layout-sharing.test.ts:6:1)

● layout sharing in non-static prefetches › segment-level prefetch config › does not unnecessarily use a runtime prefetch for sub-pages of runtime-prefetchable layouts

Expected no network requests to be initiated.

URL: http://localhost:43409/segment-config/runtime-prefetchable?_rsc=1ye1a
Headers: {"vary":"rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding","cache-control":"private, no-cache, no-store, max-age=0, must-revalidate","content-type":"text/x-component","content-encoding":"gzip","date":"Fri, 30 Jan 2026 15:38:17 GMT","connection":"keep-alive","keep-alive":"timeout=5"}

Response:
1:"$Sreact.fragment"
3:"$Sreact.suspense"
5:I[8078,["521","static/chunks/521-68a155cfea47810f.js","526","static/chunks/app/segment-config/runtime-prefetchable/page-9835957e337ebb51.js"],"DebugLinkAccordion"]
6:I[5093,[],"OutletBoundary"]
8:I[5093,[],"ViewportBoundary"]
a:I[5093,[],"MetadataBoundary"]
d:I[5752,[],""]
e:I[9838,[],""]
0:{"b":"l0eA2WJt0DSlkch9tVE4i","f":[["children","segment-config","children","runtime-prefetchable",["runtime-prefetchable",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[null,"$L2"]}],{"children":[["$","$1","c",{"children":[["$","main",null,{"children":[["$","h1",null,{"children":"Child of a runtime prefetchable layout"}],["$","div",null,{"children":[["$","p",null,{"children":["When this page is prefetched from outside of the"," ",["$","code",null,{"children":"/segment-config/runtime-prefetchable"}]," segment, the page contents will be runtime-prefetched (despite this segment not being marked as runtime-prefetchable) because the parent layout is marked as runtime-prefetchable."]}],["$","$3",null,{"fallback":"Loading...","children":"$L4"}]]}],["$","ul",null,{"children":[["$","li",null,{"children":["A page that shares some layouts with this page, and should use a static prefetch:",["$","br",null,{}],["$","$L5",null,{"href":"/segment-config/runtime-prefetchable/configured-as-static"}]]}],["$","li",null,{"children":["A page that shares some layouts with this page, and should use a runtime prefetch:",["$","br",null,{}],["$","$L5",null,{"href":"/segment-config/runtime-prefetchable/configured-as-runtime"}]]}],["$","li",null,{"children":["A page that shares some layouts with this page, and has a fully static page segment",["$","br",null,{}],["$","$L5",null,{"href":"/segment-config/runtime-prefetchable/fully-static"}]]}]]}]]}],null,["$","$L6",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false,null]},null,false,true,null],["$","$1","h",{"children":[null,["$","$L8","48K4dUDFSN4xtnUzHFD8Ev",{"children":"$L9"}],["$","div","48K4dUDFSN4xtnUzHFD8Em",{"hidden":true,"children":["$","$La",null,{"children":["$","$3",null,{"name":"Next.Metadata","children":"$Lb"}]}]}]]}],false]],"q":"","i":false,"S":false,"h":null}
2:["$","main",null,{"children":[["$","div",null,{"children":[["$","h2",null,{"children":"Shared layout"}],["$","div",null,{"children":["workUnitStore.type: ","request",null]}],["$","p",null,{"id":"static-content-layout","children":"This shared layout uses cookies and no uncached IO, so it should be completely runtime-prefetchable."}],["$","$3",null,{"fallback":"Loading ...","children":"$Lc"}]]}],["$","hr",null,{}],["$","$Ld",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$Le",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}]
4:["$","div",null,{"id":"runtime-prefetchable-content-page","children":"Runtime-prefetchable content from page"}]
c:["$","div",null,{"id":"runtime-prefetchable-content-layout","children":"Runtime-prefetchable content from shared layout"}]
9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
7:null
b:[]

  607 |       // but we'll currently automatically include it in the runtime prefetch request
  608 |       // that we're doing because of the layout's config.
> 609 |       await act(async () => {
      |             ^
  610 |         await browser
  611 |           .elementByCss(`a[href="/segment-config/runtime-prefetchable"]`)
  612 |           .click()

  at act (e2e/app-dir/segment-cache/prefetch-layout-sharing/prefetch-layout-sharing.test.ts:609:13)
  at Object.<anonymous> (e2e/app-dir/segment-cache/prefetch-layout-sharing/prefetch-layout-sharing.test.ts:627:7)

● layout sharing in non-static prefetches › segment-level prefetch config › statically prefetches a fully-static page segment if all its runtime-prefetchable parents are available

Expected no network requests to be initiated.

URL: http://localhost:43409/segment-config/runtime-prefetchable?_rsc=1ye1a
Headers: {"vary":"rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding","cache-control":"private, no-cache, no-store, max-age=0, must-revalidate","content-type":"text/x-component","content-encoding":"gzip","date":"Fri, 30 Jan 2026 15:38:17 GMT","connection":"keep-alive","keep-alive":"timeout=5"}

Response:
1:"$Sreact.fragment"
3:"$Sreact.suspense"
5:I[8078,["521","static/chunks/521-68a155cfea47810f.js","526","static/chunks/app/segment-config/runtime-prefetchable/page-9835957e337ebb51.js"],"DebugLinkAccordion"]
6:I[5093,[],"OutletBoundary"]
8:I[5093,[],"ViewportBoundary"]
a:I[5093,[],"MetadataBoundary"]
d:I[5752,[],""]
e:I[9838,[],""]
0:{"b":"l0eA2WJt0DSlkch9tVE4i","f":[["children","segment-config","children","runtime-prefetchable",["runtime-prefetchable",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[null,"$L2"]}],{"children":[["$","$1","c",{"children":[["$","main",null,{"children":[["$","h1",null,{"children":"Child of a runtime prefetchable layout"}],["$","div",null,{"children":[["$","p",null,{"children":["When this page is prefetched from outside of the"," ",["$","code",null,{"children":"/segment-config/runtime-prefetchable"}]," segment, the page contents will be runtime-prefetched (despite this segment not being marked as runtime-prefetchable) because the parent layout is marked as runtime-prefetchable."]}],["$","$3",null,{"fallback":"Loading...","children":"$L4"}]]}],["$","ul",null,{"children":[["$","li",null,{"children":["A page that shares some layouts with this page, and should use a static prefetch:",["$","br",null,{}],["$","$L5",null,{"href":"/segment-config/runtime-prefetchable/configured-as-static"}]]}],["$","li",null,{"children":["A page that shares some layouts with this page, and should use a runtime prefetch:",["$","br",null,{}],["$","$L5",null,{"href":"/segment-config/runtime-prefetchable/configured-as-runtime"}]]}],["$","li",null,{"children":["A page that shares some layouts with this page, and has a fully static page segment",["$","br",null,{}],["$","$L5",null,{"href":"/segment-config/runtime-prefetchable/fully-static"}]]}]]}]]}],null,["$","$L6",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false,null]},null,false,true,null],["$","$1","h",{"children":[null,["$","$L8","NB2aLZEgeePOTpc_F1NWyv",{"children":"$L9"}],["$","div","NB2aLZEgeePOTpc_F1NWym",{"hidden":true,"children":["$","$La",null,{"children":["$","$3",null,{"name":"Next.Metadata","children":"$Lb"}]}]}]]}],false]],"q":"","i":false,"S":false,"h":null}
2:["$","main",null,{"children":[["$","div",null,{"children":[["$","h2",null,{"children":"Shared layout"}],["$","div",null,{"children":["workUnitStore.type: ","request",null]}],["$","p",null,{"id":"static-content-layout","children":"This shared layout uses cookies and no uncached IO, so it should be completely runtime-prefetchable."}],["$","$3",null,{"fallback":"Loading ...","children":"$Lc"}]]}],["$","hr",null,{}],["$","$Ld",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$Le",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}]
4:["$","div",null,{"id":"runtime-prefetchable-content-page","children":"Runtime-prefetchable content from page"}]
c:["$","div",null,{"id":"runtime-prefetchable-content-layout","children":"Runtime-prefetchable content from shared layout"}]
9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
7:null
b:[]

  607 |       // but we'll currently automatically include it in the runtime prefetch request
  608 |       // that we're doing because of the layout's config.
> 609 |       await act(async () => {
      |             ^
  610 |         await browser
  611 |           .elementByCss(`a[href="/segment-config/runtime-prefetchable"]`)
  612 |           .click()

  at act (e2e/app-dir/segment-cache/prefetch-layout-sharing/prefetch-layout-sharing.test.ts:609:13)
  at Object.<anonymous> (e2e/app-dir/segment-cache/prefetch-layout-sharing/prefetch-layout-sharing.test.ts:660:7)

● layout sharing in non-static prefetches › segment-level prefetch config › uses a runtime prefetch for sub-pages of runtime-prefetchable layouts if requested

Expected no network requests to be initiated.

URL: http://localhost:43409/segment-config/runtime-prefetchable?_rsc=1ye1a
Headers: {"vary":"rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding","cache-control":"private, no-cache, no-store, max-age=0, must-revalidate","content-type":"text/x-component","content-encoding":"gzip","date":"Fri, 30 Jan 2026 15:38:18 GMT","connection":"keep-alive","keep-alive":"timeout=5"}

Response:
1:"$Sreact.fragment"
3:"$Sreact.suspense"
5:I[8078,["521","static/chunks/521-68a155cfea47810f.js","526","static/chunks/app/segment-config/runtime-prefetchable/page-9835957e337ebb51.js"],"DebugLinkAccordion"]
6:I[5093,[],"OutletBoundary"]
8:I[5093,[],"ViewportBoundary"]
a:I[5093,[],"MetadataBoundary"]
d:I[5752,[],""]
e:I[9838,[],""]
0:{"b":"l0eA2WJt0DSlkch9tVE4i","f":[["children","segment-config","children","runtime-prefetchable",["runtime-prefetchable",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[null,"$L2"]}],{"children":[["$","$1","c",{"children":[["$","main",null,{"children":[["$","h1",null,{"children":"Child of a runtime prefetchable layout"}],["$","div",null,{"children":[["$","p",null,{"children":["When this page is prefetched from outside of the"," ",["$","code",null,{"children":"/segment-config/runtime-prefetchable"}]," segment, the page contents will be runtime-prefetched (despite this segment not being marked as runtime-prefetchable) because the parent layout is marked as runtime-prefetchable."]}],["$","$3",null,{"fallback":"Loading...","children":"$L4"}]]}],["$","ul",null,{"children":[["$","li",null,{"children":["A page that shares some layouts with this page, and should use a static prefetch:",["$","br",null,{}],["$","$L5",null,{"href":"/segment-config/runtime-prefetchable/configured-as-static"}]]}],["$","li",null,{"children":["A page that shares some layouts with this page, and should use a runtime prefetch:",["$","br",null,{}],["$","$L5",null,{"href":"/segment-config/runtime-prefetchable/configured-as-runtime"}]]}],["$","li",null,{"children":["A page that shares some layouts with this page, and has a fully static page segment",["$","br",null,{}],["$","$L5",null,{"href":"/segment-config/runtime-prefetchable/fully-static"}]]}]]}]]}],null,["$","$L6",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@7"}]}]]}],{},null,false,false,null]},null,false,true,null],["$","$1","h",{"children":[null,["$","$L8","XDMJ4bmVmJ8zm3HPRSXSev",{"children":"$L9"}],["$","div","XDMJ4bmVmJ8zm3HPRSXSem",{"hidden":true,"children":["$","$La",null,{"children":["$","$3",null,{"name":"Next.Metadata","children":"$Lb"}]}]}]]}],false]],"q":"","i":false,"S":false,"h":null}
2:["$","main",null,{"children":[["$","div",null,{"children":[["$","h2",null,{"children":"Shared layout"}],["$","div",null,{"children":["workUnitStore.type: ","request",null]}],["$","p",null,{"id":"static-content-layout","children":"This shared layout uses cookies and no uncached IO, so it should be completely runtime-prefetchable."}],["$","$3",null,{"fallback":"Loading ...","children":"$Lc"}]]}],["$","hr",null,{}],["$","$Ld",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$Le",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}]
4:["$","div",null,{"id":"runtime-prefetchable-content-page","children":"Runtime-prefetchable content from page"}]
c:["$","div",null,{"id":"runtime-prefetchable-content-layout","children":"Runtime-prefetchable content from shared layout"}]
9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
7:null
b:[]

  607 |       // but we'll currently automatically include it in the runtime prefetch request
  608 |       // that we're doing because of the layout's config.
> 609 |       await act(async () => {
      |             ^
  610 |         await browser
  611 |           .elementByCss(`a[href="/segment-config/runtime-prefetchable"]`)
  612 |           .click()

  at act (e2e/app-dir/segment-cache/prefetch-layout-sharing/prefetch-layout-sharing.test.ts:609:13)
  at Object.<anonymous> (e2e/app-dir/segment-cache/prefetch-layout-sharing/prefetch-layout-sharing.test.ts:704:7)

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

  • 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 > errors > should trigger error boundaries for errors that occurred in runtime-prefetched 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 root params, 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 > can completely prefetch a page that uses cookies and no uncached IO (DD)
Expand output

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

Expected no network requests to be initiated.

URL: http://localhost:39553/in-page/cookies-only?_rsc=jph7j
Headers: {"vary":"rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding","cache-control":"private, no-cache, no-store, max-age=0, must-revalidate","content-type":"text/x-component","content-encoding":"gzip","date":"Fri, 30 Jan 2026 15:39:45 GMT","connection":"keep-alive","keep-alive":"timeout=5"}

Response:
1:"$Sreact.fragment"
3:I[364,[],"OutletBoundary"]
4:"$Sreact.suspense"
6:I[364,[],"ViewportBoundary"]
8:I[364,[],"MetadataBoundary"]
0:{"b":"dFUY4lHf-fDl-7ZD53DmX","f":[["children","(default)","children","in-page","children","cookies-only","children","__PAGE__",["__PAGE__",{}],[["$","$1","c",{"children":["$L2",null,["$","$L3",null,{"children":["$","$4",null,{"name":"Next.MetadataOutlet","children":"$@5"}]}]]}],{},null,false,true,null],["$","$1","h",{"children":[null,["$","$L6","C3c8MBi9v86EeN7qb6dYbv",{"children":"$L7"}],["$","div","C3c8MBi9v86EeN7qb6dYbm",{"hidden":true,"children":["$","$L8",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":"$L9"}]}]}]]}],false]],"q":"","i":false,"S":false,"h":null}
2:["$","main",null,{"children":[["$","div",null,{"children":["workUnitStore.type: ","request",null]}],["$","p",null,{"children":"This page uses cookies and no uncached IO, So it should be completely prefetchable with a runtime prefetch."}],["$","$4",null,{"fallback":["$","div",null,{"style":{"color":"grey"},"children":"Loading 1..."}],"children":"$La"}]]}]
a:["$","div",null,{"style":{"border":"1px solid blue","padding":"1em"},"children":["$","div",null,{"id":"cookie-value","children":"Cookie: initialValue"}]}]
7:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
5:null
9:[]

  529 |
  530 |       // Navigate to the page.
> 531 |       await act(
      |             ^
  532 |         async () => {
  533 |           await browser
  534 |             .elementByCss(`a[href="/${prefix}/cookies-only"]`)

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

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

Expected a response containing the given string:

Lang: de

  176 |       if (!isNextDeploy) {
  177 |         // Reveal the link to trigger a runtime prefetch for a different value of the root param
> 178 |         await act(async () => {
      |               ^
  179 |           const linkToggle = await browser.elementByCss(
  180 |             `input[data-link-accordion="/with-root-param/de/${prefix}/root-params"]`
  181 |           )

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

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

Expected no network requests to be initiated.

URL: http://localhost:39553/in-private-cache/cookies-only?_rsc=eqwlr
Headers: {"vary":"rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding","cache-control":"private, no-cache, no-store, max-age=0, must-revalidate","content-type":"text/x-component","content-encoding":"gzip","date":"Fri, 30 Jan 2026 15:40:00 GMT","connection":"keep-alive","keep-alive":"timeout=5"}

Response:
1:"$Sreact.fragment"
3:I[364,[],"OutletBoundary"]
4:"$Sreact.suspense"
6:I[364,[],"ViewportBoundary"]
8:I[364,[],"MetadataBoundary"]
0:{"b":"dFUY4lHf-fDl-7ZD53DmX","f":[["children","(default)","children","in-private-cache","children","cookies-only","children","__PAGE__",["__PAGE__",{}],[["$","$1","c",{"children":["$L2",null,["$","$L3",null,{"children":["$","$4",null,{"name":"Next.MetadataOutlet","children":"$@5"}]}]]}],{},null,false,true,null],["$","$1","h",{"children":[null,["$","$L6","j_EsZqqzuoT7ZA_fItNMAv",{"children":"$L7"}],["$","div","j_EsZqqzuoT7ZA_fItNMAm",{"hidden":true,"children":["$","$L8",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":"$L9"}]}]}]]}],false]],"q":"","i":false,"S":false,"h":null}
2:["$","main",null,{"children":[["$","div",null,{"children":["workUnitStore.type: ","request",null]}],["$","p",null,{"children":"This page uses cookies (from a private cache) and no uncached IO, So it should be completely prefetchable with a runtime prefetch."}],["$","$4",null,{"fallback":["$","div",null,{"style":{"color":"grey"},"children":"Loading 1..."}],"children":"$La"}]]}]
7:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
a:["$","div",null,{"style":{"border":"1px solid blue","padding":"1em"},"children":["$","div",null,{"id":"cookie-value","children":"Cookie: initialValue"}]}]
5:null
9:[]

  529 |
  530 |       // Navigate to the page.
> 531 |       await act(
      |             ^
  532 |         async () => {
  533 |           await browser
  534 |             .elementByCss(`a[href="/${prefix}/cookies-only"]`)

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

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

Expected no network requests to be initiated.

URL: http://localhost:39553/passed-to-public-cache/cookies-only?_rsc=43kln
Headers: {"vary":"rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding","cache-control":"private, no-cache, no-store, max-age=0, must-revalidate","content-type":"text/x-component","content-encoding":"gzip","date":"Fri, 30 Jan 2026 15:40:18 GMT","connection":"keep-alive","keep-alive":"timeout=5"}

Response:
1:"$Sreact.fragment"
3:I[364,[],"OutletBoundary"]
4:"$Sreact.suspense"
6:I[364,[],"ViewportBoundary"]
8:I[364,[],"MetadataBoundary"]
0:{"b":"dFUY4lHf-fDl-7ZD53DmX","f":[["children","(default)","children","passed-to-public-cache","children","cookies-only","children","__PAGE__",["__PAGE__",{}],[["$","$1","c",{"children":["$L2",null,["$","$L3",null,{"children":["$","$4",null,{"name":"Next.MetadataOutlet","children":"$@5"}]}]]}],{},null,false,true,null],["$","$1","h",{"children":[null,["$","$L6","fY5eTa9mIZ9PYvJS9XT2Pv",{"children":"$L7"}],["$","div","fY5eTa9mIZ9PYvJS9XT2Pm",{"hidden":true,"children":["$","$L8",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":"$L9"}]}]}]]}],false]],"q":"","i":false,"S":false,"h":null}
2:["$","main",null,{"children":[["$","div",null,{"children":["workUnitStore.type: ","request",null]}],["$","p",null,{"children":"This page uses cookies (from a private cache) and no uncached IO, So it should be completely prefetchable with a runtime prefetch."}],["$","$4",null,{"fallback":["$","div",null,{"style":{"color":"grey"},"children":"Loading 1..."}],"children":"$La"}]]}]
a:["$","div",null,{"style":{"border":"1px solid blue","padding":"1em"},"children":["$","div",null,{"id":"cookie-value","children":"Cookie: initialValue"}]}]
7:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
5:null
9:[]

  529 |
  530 |       // Navigate to the page.
> 531 |       await act(
      |             ^
  532 |         async () => {
  533 |           await browser
  534 |             .elementByCss(`a[href="/${prefix}/cookies-only"]`)

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

● runtime prefetching › cache stale time handling › includes short-lived public caches with a long enough staleTime

Expected no network requests to be initiated.

URL: http://localhost:39553/caches/public-short-expire-long-stale?_rsc=13h8q
Headers: {"vary":"rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding","cache-control":"private, no-cache, no-store, max-age=0, must-revalidate","content-type":"text/x-component","content-encoding":"gzip","date":"Fri, 30 Jan 2026 15:40:27 GMT","connection":"keep-alive","keep-alive":"timeout=5"}

Response:
1:"$Sreact.fragment"
3:I[364,[],"OutletBoundary"]
4:"$Sreact.suspense"
6:I[364,[],"ViewportBoundary"]
8:I[364,[],"MetadataBoundary"]
0:{"b":"dFUY4lHf-fDl-7ZD53DmX","f":[["children","(default)","children","caches","children","public-short-expire-long-stale","children","__PAGE__",["__PAGE__",{}],[["$","$1","c",{"children":["$L2",null,["$","$L3",null,{"children":["$","$4",null,{"name":"Next.MetadataOutlet","children":"$@5"}]}]]}],{},null,false,true,null],["$","$1","h",{"children":[null,["$","$L6","B9HXbhshlH2qYAU7MsxGev",{"children":"$L7"}],["$","div","B9HXbhshlH2qYAU7MsxGem",{"hidden":true,"children":["$","$L8",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":"$L9"}]}]}]]}],false]],"q":"","i":false,"S":false,"h":null}
2:["$","main",null,{"children":[["$","div",null,{"children":["workUnitStore.type: ","request",null]}],["$","p",null,{"id":"intro","children":"This page uses a short-lived public cache (expire < DYNAMIC_EXPIRE, 5min), which should not be included in a static prefetch, but should be included in a runtime prefetch, because it has a long enough stale time (≥ RUNTIME_PREFETCH_DYNAMIC_STALE, 30s)"}],["$","$4",null,{"fallback":["$","div",null,{"style":{"color":"grey"},"children":"Loading..."}],"children":"$La"}]]}]
a:["$","div",null,{"style":{"border":"1px solid blue","padding":"1em"},"children":["Short-lived cached content",["$","div",null,{"id":"cached-value","children":1769787626589}]]}]
7:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
5:null
9:[]

  768 |       // Navigate to the page. We didn't include any uncached IO, so the page is fully prefetched,
  769 |       // and this shouldn't issue any more requests
> 770 |       await act(async () => {
      |             ^
  771 |         await browser.elementByCss(`a[href="${path}"]`).click()
  772 |       }, 'no-requests')
  773 |

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

● runtime prefetching › cache stale time handling › includes public caches with cacheLife("seconds")

Expected no network requests to be initiated.

URL: http://localhost:39553/caches/public-seconds?_rsc=upi48
Headers: {"vary":"rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding","cache-control":"private, no-cache, no-store, max-age=0, must-revalidate","content-type":"text/x-component","content-encoding":"gzip","date":"Fri, 30 Jan 2026 15:40:27 GMT","connection":"keep-alive","keep-alive":"timeout=5"}

Response:
1:"$Sreact.fragment"
3:I[364,[],"OutletBoundary"]
4:"$Sreact.suspense"
6:I[364,[],"ViewportBoundary"]
8:I[364,[],"MetadataBoundary"]
0:{"b":"dFUY4lHf-fDl-7ZD53DmX","f":[["children","(default)","children","caches","children","public-seconds","children","__PAGE__",["__PAGE__",{}],[["$","$1","c",{"children":["$L2",null,["$","$L3",null,{"children":["$","$4",null,{"name":"Next.MetadataOutlet","children":"$@5"}]}]]}],{},null,false,true,null],["$","$1","h",{"children":[null,["$","$L6","611BKNgOGYt0PNgTP4vlEv",{"children":"$L7"}],["$","div","611BKNgOGYt0PNgTP4vlEm",{"hidden":true,"children":["$","$L8",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":"$L9"}]}]}]]}],false]],"q":"","i":false,"S":false,"h":null}
2:["$","main",null,{"children":[["$","div",null,{"children":["workUnitStore.type: ","request",null]}],["$","p",null,{"id":"intro","children":"This page uses a short-lived public cache (with cacheLife(\"seconds\")), which should not be included in a static prefetch, but should be included in a runtime prefetch, because it has a long enough stale time (≥ RUNTIME_PREFETCH_DYNAMIC_STALE, 30s)"}],["$","$4",null,{"fallback":["$","div",null,{"style":{"color":"grey"},"children":"Loading..."}],"children":"$La"}]]}]
a:["$","div",null,{"style":{"border":"1px solid blue","padding":"1em"},"children":["Short-lived cached content",["$","div",null,{"id":"cached-value","children":1769787627339}]]}]
7:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
5:null
9:[]

  768 |       // Navigate to the page. We didn't include any uncached IO, so the page is fully prefetched,
  769 |       // and this shouldn't issue any more requests
> 770 |       await act(async () => {
      |             ^
  771 |         await browser.elementByCss(`a[href="${path}"]`).click()
  772 |       }, 'no-requests')
  773 |

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

● runtime prefetching › cache stale time handling › includes private caches with cacheLife("seconds")

Expected no network requests to be initiated.

URL: http://localhost:39553/caches/private-seconds?_rsc=hf9t5
Headers: {"vary":"rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding","cache-control":"private, no-cache, no-store, max-age=0, must-revalidate","content-type":"text/x-component","content-encoding":"gzip","date":"Fri, 30 Jan 2026 15:40:28 GMT","connection":"keep-alive","keep-alive":"timeout=5"}

Response:
1:"$Sreact.fragment"
3:I[364,[],"OutletBoundary"]
4:"$Sreact.suspense"
6:I[364,[],"ViewportBoundary"]
8:I[364,[],"MetadataBoundary"]
0:{"b":"dFUY4lHf-fDl-7ZD53DmX","f":[["children","(default)","children","caches","children","private-seconds","children","__PAGE__",["__PAGE__",{}],[["$","$1","c",{"children":["$L2",null,["$","$L3",null,{"children":["$","$4",null,{"name":"Next.MetadataOutlet","children":"$@5"}]}]]}],{},null,false,true,null],["$","$1","h",{"children":[null,["$","$L6","hfThacFgQ1QJpgf8_RWEgv",{"children":"$L7"}],["$","div","hfThacFgQ1QJpgf8_RWEgm",{"hidden":true,"children":["$","$L8",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":"$L9"}]}]}]]}],false]],"q":"","i":false,"S":false,"h":null}
2:["$","main",null,{"children":[["$","div",null,{"children":["workUnitStore.type: ","request",null]}],["$","p",null,{"id":"intro","children":"This page uses a short-lived private cache (with cacheLife(\"seconds\")), which should not be included in a static prefetch, but should be included in a runtime prefetch, because it has a long enough stale time (≥ RUNTIME_PREFETCH_DYNAMIC_STALE, 30s)"}],["$","$4",null,{"fallback":["$","div",null,{"style":{"color":"grey"},"children":"Loading..."}],"children":"$La"}]]}]
a:["$","div",null,{"style":{"border":"1px solid blue","padding":"1em"},"children":["Short-lived cached content",["$","div",null,{"id":"cached-value","children":1769787628637}]]}]
7:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
5:null
9:[]

  768 |       // Navigate to the page. We didn't include any uncached IO, so the page is fully prefetched,
  769 |       // and this shouldn't issue any more requests
> 770 |       await act(async () => {
      |             ^
  771 |         await browser.elementByCss(`a[href="${path}"]`).click()
  772 |       }, 'no-requests')
  773 |

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

● runtime prefetching › errors › should trigger error boundaries for errors that occurred in runtime-prefetched content

Expected no network requests to be initiated.

URL: http://localhost:39553/errors/error-after-cookies?_rsc=t5b01
Headers: {"vary":"rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding","cache-control":"private, no-cache, no-store, max-age=0, must-revalidate","content-type":"text/x-component","content-encoding":"gzip","date":"Fri, 30 Jan 2026 15:40:46 GMT","connection":"keep-alive","keep-alive":"timeout=5"}

Response:
1:"$Sreact.fragment"
3:I[364,[],"OutletBoundary"]
4:"$Sreact.suspense"
6:I[364,[],"ViewportBoundary"]
8:I[364,[],"MetadataBoundary"]
a:I[4342,["7937","static/chunks/app/(default)/errors/error-after-cookies/page-1b378297bb9e7e76.js"],"ErrorBoundary"]
0:{"b":"dFUY4lHf-fDl-7ZD53DmX","f":[["children","(default)","children","errors","children","error-after-cookies","children","__PAGE__",["__PAGE__",{}],[["$","$1","c",{"children":["$L2",null,["$","$L3",null,{"children":["$","$4",null,{"name":"Next.MetadataOutlet","children":"$@5"}]}]]}],{},null,false,true,null],["$","$1","h",{"children":[null,["$","$L6","gE-CQ7DqWM27d2byj-0VYv",{"children":"$L7"}],["$","div","gE-CQ7DqWM27d2byj-0VYm",{"hidden":true,"children":["$","$L8",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":"$L9"}]}]}]]}],false]],"q":"","i":false,"S":false,"h":null}
2:["$","main",null,{"children":[["$","div",null,{"children":["workUnitStore.type: ","request",null]}],["$","p",null,{"id":"intro","children":"This page errors after a cookies call, so we should only see the error in a runtime prefetch or a navigation (and not during prerendering / prefetching)"}],["$","$4",null,{"fallback":["$","div",null,{"style":{"color":"grey"},"children":"Loading 1..."}],"children":["$","$La",null,{"children":"$Lb"}]}]]}]
b:E{"digest":"2496586849"}
7:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
5:null
9:[]

  1071 |       // Navigate to the page. We already have the paged cached.
  1072 |       // Even though the render errored, we shouldn't fetch it again.
> 1073 |       await act(async () => {
       |             ^
  1074 |         await browser
  1075 |           .elementByCss(`a[href="/errors/error-after-cookies"]`)
  1076 |           .click()

  at Object.act (e2e/app-dir/segment-cache/prefetch-runtime/prefetch-runtime.test.ts:1073:13)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants