Skip to content

[pull] canary from vercel:canary#1122

Merged
pull[bot] merged 3 commits into
code:canaryfrom
vercel:canary
Jun 11, 2026
Merged

[pull] canary from vercel:canary#1122
pull[bot] merged 3 commits into
code:canaryfrom
vercel:canary

Conversation

@pull

@pull pull Bot commented Jun 11, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

unstubbable and others added 3 commits June 11, 2026 16:31
…led (#94655)

With `partialPrefetching` enabled, navigating back to a page that was
first loaded as a full HTML document served stale dynamic content. Its
`connection()`-gated output kept showing the value from the original
document load instead of being re-run per request, and the `<Link
prefetch={true}>` navigation issued no server request at all. A page
first reached through a prefetch behaved correctly, so the problem only
surfaced after an initial HTML load.

The cause was a missing prefetch hint on the route tree that the client
caches from that initial HTML render. The app-page build template
assembles the route module's `renderOpts` directly from `nextConfig`,
and that field list carried `cacheComponents` and the `experimental`
block but left out `partialPrefetching`. So
`renderOpts.partialPrefetching` was `undefined` for every runtime render
even with the flag on; only the build-time prerender and per-segment
prefetch artifacts, produced through the export worker, had the correct
value. As a result the route tree computed at runtime and inlined into
the initial HTML lacked the `SubtreeHasPartialPrefetching` hint and
picked up `SubtreeHasEagerPrefetch` instead. When that tree was later
reused for a `prefetch={true}` navigation, the client never downgraded
the full prefetch to a partial one, so it promoted the fully resolved
hydration entry out of the bfcache into a non-partial segment and served
it stale.

The fix passes `nextConfig.partialPrefetching` through the template's
`renderOpts` (kept raw so `'unstable_eager'` survives), so runtime
renders emit the same hint as the build artifacts and the existing
client-side downgrade handles the rest. A regression test navigates back
to a page after its initial HTML load and asserts, via the router `act`
helper, that the navigation re-fetches the dynamic content instead of
serving it stale.
Continuation of - #92382

### What?

Adds a `generateStaticParams` section to [Migrating to Cache
Components](https://nextjs.org/docs/app/guides/migrating-to-cache-components).

### Why?

Developers migrating dynamic routes (for example blogs with `[slug]`)
had no guidance in that guide for how `generateStaticParams` behaves
with Cache Components, why `next build` can show ◐ instead of ○, or that
`return []` becomes a build error.

### How?

- Link to `generateStaticParams` with Cache Components, dynamic routes
with Cache Components, and the `empty-generate-static-params` message
doc instead of duplicating full behavior.
- Before/after example: empty array vs at least one sample param.
- Short note on ◐ (Partial Prerender) with links to the public pages PPR
section and glossary.


Related: #92507
@pull pull Bot locked and limited conversation to collaborators Jun 11, 2026
@pull pull Bot added the ⤵️ pull label Jun 11, 2026
@pull pull Bot merged commit 8052dc9 into code:canary Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants