- 24 Jun, 2026 20 commits
-
-
next-js-bot[bot] authored
-
Sebastian "Sebbie" Silbermann authored
A `pnpm install` installs native bindings for Next.js by default. This makes sense for local development where half of the team doesn't work on native code and just needs the most recent bindings. However, CI almost exclusively wants to test with bindings that are built from the current commit. The rest doesn't need native bindings at all. The only exception is `test_examples` which is likely not functional. Though we still support it by allowing to opt-into automatically installing native bindings in CI. ## test plan - [x] fetch test timings still skips: https://github.com/vercel/next.js/actions/runs/28087707205/job/83157705446?pr=95114#step:7:228
-
next-js-bot[bot] authored
-
Hendrik Liebau authored
The `hmr-intercept-routes` test created the `@intercept` parallel-route slot files before editing the root layout to render the slot. Adding a new parallel-route slot is a structural change that forces a full page reload, and that reload raced with the Fast Refresh for the layout edit. Under load the client's `reloading` guard could drop the in-flight refresh, so the new slot never reached the browser and the test timed out waiting for `#default-intercept`, [failing 30-40% of the time in CI](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22%20%40test.name%3A%22hmr-intercept-routes%20should%20update%20intercept%20routes%20via%20HMR%22%20%40test.status%3A%28fail%20OR%20pass%29&agg_m=count&agg_m_source=base&agg_t=count¤tTab=overview&eventStack=&fromUser=false&index=citest&start=1781719381980&end=1782324181980&paused=false). <img width="428" height="176" alt="Screenshot 2026-06-24 at 20 04 01" src="https://github.com/user-attachments/assets/0272886e-dd75-4dbd-bd8c-b26ee8f40082" /> This change edits the layout first, so the `intercept` slot is already rendered as an undefined, no-op prop before the slot files exist. Creating the slot files afterward triggers the structural reload, and because the layout already renders the slot, that reload serves the complete updated route tree in a single fetch with no competing Fast Refresh. The server always resolved the route correctly; only the browser-side delivery was racy.
-
Sam Selikoff authored
Before: <img width="505" height="457" alt="image" src="https://github.com/user-attachments/assets/5f30079f-1d6e-44f6-8c3a-476f6463f346" /> <img width="498" height="457" alt="image" src="https://github.com/user-attachments/assets/d14e3cb2-fc14-4d01-bf13-00dd8478f06e" /> After: <img width="518" height="464" alt="image" src="https://github.com/user-attachments/assets/0d89a389-eb25-4d3a-b6e6-58cb084bc661" /> <img width="505" height="454" alt="image" src="https://github.com/user-attachments/assets/a985e10a-a7c1-4314-9061-f531fab49a05" />
-
Hendrik Liebau authored
Reverts vercel/next.js#95127 This was a stale merge, now the case was duplicated.
-
Hendrik Liebau authored
The `switch` statement was added in #95100 when the `'prerender-ppr'` didn't exist anymore. Afterwards #95113 landed and re-introduced the `'prerender-ppr'` case, but it was not added to the `switch` statement, which caused a type error.
-
Sebastian "Sebbie" Silbermann authored
Add a `preview` release type so `@preview` npm releases can be cut **ad-hoc from `canary`** via the `Trigger Release` workflow, retiring the dedicated long-lived preview branch. The GitHub environment has been updated accordingly. A preview cut produces **two commits**, pushed in a single update: 1. **Bump-to-preview** — all packages set to the computed preview version, tagged `v…-preview.N`. This tag's build publishes `@preview` (relies on #95085). 2. **Revert-to-canary** — restores the `-canary.N` versions so `canary` keeps advancing its own line and isn't stranded on a preview version. ``` B canary HEAD before cut (e.g. 16.3.0-canary.61) │ P v16.3.0-preview.N ← tag here; tag build publishes @preview │ R canary HEAD after cut (versions restored to 16.3.0-canary.61) ``` ### Preview version numbering `base = max(canary major.minor.patch, npm @preview major.minor.patch)`: - base still on the published preview line → continue it (`n + 1`) - canary advanced to a higher base (or no `@preview` published) → reset to `.0` So if `canary` jumps to `18.0.0-canary.x` since the last `16.3.0-preview.x`, the next cut is `18.0.0-preview.0`, not a continuation. ## Test plan The dry mode of `start-release.js` was extended to intercept the GH requests and log the relevant data. ```console $ node ./scripts/start-release.js --release-type preview --dry-run Dry run: keeping commits locally, skipping git push and GitHub release creation Running pnpm release-preview... [...] > lerna version 16.3.0-preview.4 --force-publish -y --no-push --allow-branch '**' [...] Creating GitHub-signed release commit(s) for v16.3.0-preview.4 from local commits 0f5c1e865cc34edb257a16823ed6525d9cd58bfc..0062348c411776271fe7eac64e97b8bad2775b77 [dry-run] GitHub API POST /repos/vercel/next.js/git/blobs [...] [dry-run] GitHub API POST /repos/vercel/next.js/git/commits {"message":"v16.3.0-preview.4","tree":"0000000000000000000000000000000000000016","parents":["0f5c1e865cc34edb257a16823ed6525d9cd58bfc"]} [dry-run] GitHub API POST /repos/vercel/next.js/git/commits {"message":"Restore canary version 16.3.0-canary.61 after v16.3.0-preview.4 preview release","tree":"000000000000000000000000000000000000002d","parents":["0000000000000000000000000000000000000017"]} [dry-run] GitHub API POST /repos/vercel/next.js/git/refs {"ref":"refs/tags/v16.3.0-preview.4","sha":"0000000000000000000000000000000000000017"} [dry-run] GitHub API PATCH /repos/vercel/next.js/git/refs/heads/sebbie/preview-release-from-canary {"sha":"000000000000000000000000000000000000002e","force":false} Dry run: skipping local branch sync; would set sebbie/preview-release-from-canary to 000000000000000000000000000000000000002e and tag v16.3.0-preview.4 at 0000000000000000000000000000000000000017 Created GitHub-signed release tag v16.3.0-preview.4 at 0000000000000000000000000000000000000017; branch sebbie/preview-release-from-canary now at 000000000000000000000000000000000000002e Dry run: skipping GitHub release creation Release process is finished ``` -
Sebastian "Sebbie" Silbermann authored
Fixes >This environment is not supported by Next.js or publish of 16.3.0-canary.64 is incomplete. -- https://github.com/vercel/next.js/actions/runs/28082958066/job/83141991913#step:7:246
-
Joseph authored
## Summary - `prefetch.mdx`: corrections, disambiguation and TS signature update - `runtime-prefetching.mdx`: App Shells section corrections - `instant-navigation.mdx`: DevTools section re-aligned (mpa/spa split, panel labels, cold-cache indicator) - x-refs ## TODO - [x] `partialPrefetching.mdx` API reference with the three levels of prefetch - [x] runtime prefetching journey
-
Aurora Scharff authored
### What? Wires the dev-only `<Link prefetch={true}>` Partial Prefetching warning from [#94672](https://github.com/vercel/next.js/pull/94672) into the Instant Insights surface. Code frame, call stack, three fix cards: **Upgrade** `prefetch = 'partial'` · **Disable** the prop · **Ignore** with `instant = false`. Demo: [93-link-prefetch-without-partial](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/93-link-prefetch-without-partial). ### How? - Warning factored into a shared `instant-messages.ts` factory. - New `link-prefetch-partial` overlay kind + `Instant` label + `InstantRuntimeError` dispatcher. - Two new fix-card groups: **Upgrade** (amber, arrow-up), **Disable** (gray, minus). - New `instant-link-prefetch-partial.mdx` rule page + "Auditing existing calls" section in the adoption guide. - Unit tests for the matcher, cards, and `isInstantNavigationError`. ### Related - [#94818](https://github.com/vercel/next.js/pull/94818) — broader Partial Prefetching docs cleanup. Lands independently. - [vercel/front#73592](https://github.com/vercel/front/pull/73592) — next-site `upgrade` + `disable` `FixGroup` values. -
Sebastian "Sebbie" Silbermann authored
-
next-js-bot[bot] authored
-
Hendrik Liebau authored
`getHeaders` in the request store strips internal flight and dev request-id headers before sealing the object exposed to userland `headers()`. It built that object with `HeadersAdapter.from(req.headers)`, which wraps `IncomingHttpHeaders` (and returns a `Headers` instance) without copying, so the `delete` calls mutated the shared `req.headers` as a side effect. This regressed redirects from a server action that reads `headers()` when `cacheComponents` is enabled in `next dev`, introduced by #94703. That change added the dev request-id headers (`x-nextjs-request-id` and `x-nextjs-html-request-id`) to the set stripped in `getHeaders`. The flight headers had been stripped from the shared object for a long time without issue because their absence is a handled state, but the request-id headers are different: the action's `headers()` access now deleted them from `req.headers`, and the dev instant-navigation render of the redirect target, which reuses the same request, then read a missing request id and fabricated a mismatched HTML request id. The React dev debug channel was registered under that wrong id, so the client overlay stayed in "Rendering..." and never applied the navigation. This change copies the headers before stripping so only the sealed userland view is affected, leaving the shared request headers intact. It adds an e2e test that reproduces the regression. fixes #95103
-
Hendrik Liebau authored
To make `cacheMaxMemorySize: 0` fast in development, the `'use cache'` wrapper forced every built-in cache entry to a dynamic cache life (`revalidate: 0`, a five-minute `expire`) so that warm reads would serve the stale value and regenerate a fresh one in the background. That forcing leaked into the stored entry, and an entry with `revalidate: 0` is treated as too dynamic to live in a static shell. On a warm reload of a route that is fully cached and has no `<Suspense>` above the `'use cache'`, the dev validation prerender read the entry and threw an error claiming that a `'use cache'` with zero `revalidate` was nested inside another `'use cache'` that has no explicit `cacheLife`, even though nothing was actually nested, and reported the route as a blocking route. The cold load was unaffected because the entry did not exist yet. With this change the size-0 case no longer forces a dynamic cache life and keeps the entry's resolved life instead: the explicit `cacheLife()` values when the user set them, otherwise the default (a 15-minute `revalidate` and an infinite `expire`). That default sits well above the dynamic thresholds, so a fully cached route can be prerendered again and the false-positive blocking error is gone. An explicitly short `cacheLife()` still makes the route legitimately dynamic without a spurious throw, because the explicit-revalidate and explicit-expire flags are then set. Private caches are unchanged and remain forced-dynamic. So that reloads keep showing a fresh value now that the stored life is no longer always stale, the background revalidation in the cache-hit path also fires for size-0 built-in entries regardless of the stored `revalidate`, restricted to the dynamic dev request render so the dev validation prerender does not also regenerate.
-
Aurora Scharff authored
### What? Docs-only follow-ups for Cache Components and Partial Prefetching, from agent migration friction logs and Joseph's review of [#95082](https://github.com/vercel/next.js/pull/95082). - **`adopting-partial-prefetching.mdx`** — reframe the `allow-runtime` row in the audit table (it's an enhancement, not the `<Link prefetch={true}>` warning fix; the per-route opt-in is `prefetch = 'partial'`). - **`migrating-to-cache-components.mdx`** — split the `## Enable Cache Components` section into before-flag (remove `dynamic` / `revalidate` / `fetchCache`) and after-flag (translate `revalidate`, `fetchCache`, `unstable_cache`, `fetch` cache options) steps. Flag the `revalidateTag` second-argument requirement, with a Before / After example. Add two Good-to-know callouts: off-grid `revalidate` values map to the closest `cacheLife` profile; `instant = false` is allowed-to-block, not forced-dynamic. - **`blocking-prerender-current-time` / `-random` / `-crypto`** (and their `-client` siblings) — drop the misleading "Don't want this validation?" opt-out section. `instant = false` is an instant-navigation knob and doesn't suppress sync-IO prerender errors. - **Remaining `blocking-prerender-*` pages** — standardize the CLS fallback callout so they all link the canonical section. ### Why? Friction logs surfaced four recurring misreads: 1. Devs expected `prefetch = 'allow-runtime'` to silence the `<Link prefetch={true}>` warning. The docs implied it would. 2. The migration guide mixed `dynamic` removal with `unstable_cache` translation, so it wasn't clear which had to happen before the flag and which after. 3. `revalidateTag` now requires a cache profile, but the on-demand revalidation section didn't say so. 4. Sync-IO error pages still carried a "Don't want this validation?" opt-out that doesn't actually work for those errors.
-
next-js-bot[bot] authored
-
Sebastian "Sebbie" Silbermann authored
That way we can push multiple commits when doing a release. For canaries, nothing will change. In a follow-up, we'll start cutting `@preview` from the `canary` branch. To support that case, we need to immediately revert the version in `lerna.json`. We shouldn't push commits indidually to avoid having an incomplete release if something else is pushed between `@preview` version bumps and `@canary` version reverts. ## test plan After merge, the next canary release should publish from the `v…-canary.N` tag run (`deploy-target = production`), while the canary branch push for the same commit shows `skipped` — exactly one production run per release. <!-- NEXT_JS_LLM_PR -->
-
Tobias Koppers authored
### What? Adds a `TURBOPACK_DEBUG_CSS_CHUNKING` environment variable. When set to a truthy value, the graph-based CSS chunker (`experimental.cssChunking: "graph"`) writes a JSON snapshot of its inputs and outputs to the current working directory on each invocation. ### Why? We are investigating problems with the new graph-based CSS chunking algorithm. The pipeline (`create_graph` → `make_acyclic` → `linearize` → `split_into_chunks`) is internal to `turbopack-core` and doesn't surface enough information through normal build output to debug bad chunking decisions post-hoc. A side-channel dump lets us reproduce and reason about a problematic build without instrumenting Rust on a user's machine. ### How? In `turbopack/crates/turbopack-core/src/module_graph/style_groups_graph/mod.rs`, between `split_into_chunks` and the result assembly: - Whether the dump is enabled is cached in a `static DEBUG_DUMP_ENABLED: LazyLock<bool>` so the env var is read exactly once per process. Truthy = anything other than unset, empty, `0`, or `false` (case-insensitive). - When enabled, every call to `compute_style_groups_graph` resolves `ident_string()` for every CSS module in parallel via `try_join` and writes a pretty-printed JSON file `turbopack-css-chunking-debug-<unix_ms>-<seq>.json` in the current working directory. The timestamp + atomic counter suffix ensures concurrent or repeated calls don't clobber each other. - Failures while writing the dump are logged to stderr and otherwise swallowed — a debug toggle must never fail a build. The JSON document contains: - `chunk_groups`: `string[][]` — module idents per chunk group, in the order the algorithm sees them. - `global_order`: `string[]` — the flat global order produced by `linearize`. - `global_order_chunks`: `string[][]` — the same modules grouped by the merged segments produced by `split_into_chunks` (e.g. `[["a","b"], ["c"], ["d","e","f"]]`). - `modules`: `[{ ident, size, style_type }]` — per-module metadata where `size` is the chunk item size in bytes (the same value used by the cost model) and `style_type` is `"GlobalStyle"` or `"IsolatedStyle"`. Verification: `cargo clippy -p turbopack-core --no-deps` is clean and the existing `style_groups_graph` test suite passes (53 tests). No user-facing config change, no docs change — the env var is intentionally undocumented and only meant for triage. Closes NEXT- Fixes # --------- Co-authored-by:v-work-app[bot] <262237222+v-work-app[bot]@users.noreply.github.com> Co-authored-by:
Claude <noreply@anthropic.com> Co-authored-by:
Tobias Koppers <sokra@users.noreply.github.com>
-
Sam Poder authored
This PR adds support for generating single-entry chunks, based on this plan: https://gist.github.com/bgw/356344ea6fb0e897647c478d01c096d3 up until Step 6. Also adds a basic snapshot test to capture this behaviour. --------- Co-authored-by:
Benjamin Woodruff <benjamin.woodruff@vercel.com>
-
- 23 Jun, 2026 17 commits
-
-
Sam Poder authored
See https://github.com/vercel/next.js/pull/95026/changes#r3462912703; as discussed in office hours --------- Co-authored-by:
Tobias Koppers <tobias.koppers@googlemail.com>
-
next-js-bot[bot] authored
-
Hendrik Liebau authored
When Cache Components is enabled, the development server threads a `fallbackParams` request meta for dynamic app routes so the staged render knows which params are not statically known and must be deferred to a later stage. The previous computation walked the prerendered routes from `getStaticPaths` and kept the one with the fewest fallback params, without checking that the route actually matched the requested URL. Consider `/mixed/[lang]/[id]` where `generateStaticParams` covers `lang: 'en'` but not `id`: the prerendered routes are the base `/mixed/[lang]/[id]`, which defers `[lang, id]`, and the covered `/mixed/en/[id]`, which defers only `[id]`. For the request `/mixed/fr/123` the fewest-fallback route is `/mixed/en/[id]`, but `en` does not match `fr`, so applying its `[id]` set left `lang` out of the fallback set and `fr` was treated as a statically known value. Because this meta decides which stage each param resolves in, and the stage decides the environment a replayed `console.log` is attributed to, treating `fr` as static resolved it in the prerender stage instead of deferring it to the runtime stage. The computation now matches the requested URL against each prerendered route with the canonical `getRouteRegex` and, among the routes that match, picks the most-specific one, the one with the fewest fallback params. For `/mixed/fr/123` only the base route matches, so its `[lang, id]` set is used and both params defer, while for `/mixed/en/123` the covered `/mixed/en/[id]` still matches and wins, so `lang` resolves statically and only `id` defers. This mirrors what a production build writes to the prerender manifest, where the server matches the URL to the most-specific prerendered route at request time. The change is development-only, gated on the route module being in dev mode, and production continues to read the manifest. A later change in this stack reads the same `fallbackParams` meta for the Instant Navigation testing API's on-demand shell render, so that path defers the identical per-URL set a production prefetch would.
-
Hendrik Liebau authored
The `instant()` helper in `@next/playwright` released the navigation lock by calling `page.context().clearCookies({ name: INSTANT_COOKIE })`. Playwright implements a filtered `clearCookies` non-atomically: it clears the entire cookie jar and then re-adds the cookies that don't match the filter, briefly removing the application's own cookies too. Because Next.js reacts to the instant cookie's deletion by immediately re-rendering (a soft refresh or a full reload), a render whose request raced that empty window observed none of the test's cookies, so a page reading `cookies()` rendered as if nothing was set, for example `testCookie: not set`. Resource contention widened the clear-then-re-add window, which is why the instant navigation suite failed intermittently in CI. <img width="225" height="225" alt="empty cookie jar" src="https://github.com/user-attachments/assets/770b8817-e4c4-4b4b-8251-30353d892816" /> We now release the lock by reading the instant cookie's stored entries (Next.js may have updated the value, e.g. from `[0]` to `[1, null]`, but preserves the domain and path) and re-adding each with a past expiry, which deletes only those entries and leaves every other cookie untouched. This removes the transient empty-jar window while still firing the CookieStore deletion event that releases the lock. To exercise the fix under the conditions that surfaced it, we want CI's flake-detection job to replay the instant navigation suite, which only happens when the suite's test file changes. We trigger that by un-skipping the `renders runtime-prefetched content instantly during navigation` test. That test had been skipped as flaky because of a real bug in the dev runtime-prefetch decode, which #94866 has since fixed, so it passes reliably now and no longer needs to be skipped. -
Joseph authored
The caching guide and ISR without CC, did not reference, nor mention, generateStaticParams. Additionally, we have learned that agents do use `max` for CMS content and such, but not as often as we'd like. The default cache life time, has a revalidate of 15 minutes, which for content that changes rarely, is too often. Note that `max` is defined as the life time for that case. We could do a further expansion that, the 30 days is enough because managed hosting likely evicts the generated asset after 30 days anyway, and that maybe self-host can use longer revalidate too, and that way have a discoverability path for defining a custom profile.
-
Luke Sandberg authored
Bump link-section to pick up https://github.com/mmastrac/linktime/pull/481 This fixes a bug in linktime that could trigger a miscompilation on windows, see https://github.com/mmastrac/linktime/issues/479 for a detailed description @bgw and I both confirmed that this fixed the windows crash, though we have failed to produce a reproduction. This appears to not be triggering in CI due to a different release profile.
-
Hendrik Liebau authored
In #95064 we added a global opt-in to the runtime stage of Cached Navigations: setting `cachedNavigations: 'allow-runtime'` makes every route runtime-cache, on top of the existing per-segment `prefetch = 'allow-runtime'`. This extends the opt-in: a `prefetch` config of `'partial'`, `'unstable_eager'`, or `'allow-runtime'` all enable Partial Prefetching for a route, and a route already doing PPR-style partial prefetching should also runtime-cache its navigations. The next-config `partialPrefetching`, which enables Partial Prefetching globally, opts every route in as well. Both runtime-prefetch spawn gates in `app-render.tsx` now broaden their condition to include `partialPrefetching` and any segment `prefetch` that enables Partial Prefetching, via a new `anySegmentHasPartialPrefetchingEnabled` helper. The narrower callers that gate metadata staging and the dev reveal stage keep using `anySegmentHasRuntimePrefetchEnabled`, since they specifically concern routes the client runtime-prefetches (`'allow-runtime'`), not partial ones. Because `partialPrefetching` has no default and is not auto-enabled by `cacheComponents`, apps that do not set it are unaffected. Tests add `prefetch = 'partial'` and `prefetch = 'unstable_eager'` routes to the existing `default` fixture and a new `partial-prefetching` fixture for the global config, each asserting the route runtime-caches its request-derived content on a second navigation without a per-segment `prefetch = 'allow-runtime'` export.
-
Aurora Scharff authored
### What Driven by three friction logs from agents running `next-cache-components-adoption` against starting points the skill silently assumed. - Restructure `## requires` as a labeled checklist: **App Router project**, **Next.js 16.3 or later**, **No incompatible config keys**. Each item names what's checked, what the failure mode is, and where to resolve it. - Hoist the **No green baseline before the flag** note out of the prereq pile into a separate `### notes` block (alongside **Offline docs**), so a reader scanning prereqs doesn't conflate it with a hard requirement. - Tighten the codemod block: explain `@canary`'s necessity in one line so an agent hitting `Invalid transform choice` from `@latest` knows the workaround. ### Why Three friction logs each hit a different version of the same gap: - **react.dev migration**: agent ran codemod with `@latest` (16.2.9) → `Invalid transform choice` → applied transform by hand. - **Marketing-site case**: agent built the spec with `revalidate` exports, codemod left them in, `cacheComponents: true` rejected the build. - **E-commerce case**: `experimental.dynamicIO`/`useCache` left in `next.config` → fatal config error. In each case the skill *technically* said what to do but it was buried. ### Related The migration-guide changes that were originally in this PR moved to [#94997](https://github.com/vercel/next.js/pull/94997). ### Type of Change - [x] Documentation (adds or changes documentation) <!-- NEXT_JS_LLM_PR -->
-
Sam Selikoff authored
Updates the Navigation Inspector panel UI to match the new shell-inspection design. - Reworks the idle, waiting, static shell, and client shell states around the new “Pause on navigations” toggle - Adds full-width waiting/debugger banners, updated copy, URL labels, and the `Resume` action - Simplifies the panel expansion animation so only the panel opens/closes, without fading the inner content To try it out, run ``` pnpm next dev test/development/app-dir/instant-navs-devtools ``` https://github.com/user-attachments/assets/271d788e-87b9-4787-8d31-8008b9e693c0 --------- Co-authored-by:
vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
-
Aurora Scharff authored
### Why? Two Insight fix cards were misleading: 1. **`generateStaticParams` showed up on every runtime/client-hook insight.** One error covers `cookies()` / `headers()` / `params` / `searchParams`. GSP only applies to `params`; for the others it's noise. Even for `params` it nudges devs to make the route static instead of fixing the immediate error. 2. **`"use cache"` showed up on `connection()` triggers.** Caching `connection()` is contradictory. Both manifest on initial load and in-navigation (the fix-card sets are shared). ### What? 1. **Drop the GSP card** from runtime + client-hook sets. Affects [01-cookies-body](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/01-cookies-body), [03-params-body](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/03-params-body), [90-client-use-params](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/90-client-use-params), [41-subnav-cookies](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/41-subnav-cookies), [42-subnav-fetch](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/42-subnav-fetch). 2. **Filter `"use cache"`** when the cause is `connection()`. Affects [05-connection-body](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/05-connection-body), [08-connection-body-dynamic](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/08-connection-body-dynamic), [31-connection-in-metadata](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/31-connection-in-metadata), [33-connection-in-viewport](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/33-connection-in-viewport). [06-uncached-fetch-body](https://error-messages-overhaul-ibsl.labs.vercel.dev/scenario/06-uncached-fetch-body) keeps the Cache card. ### How? - `getCards()` filters the cache card when `cause === 'connection'`. - New `deriveCauseFromCodeFrame()` helper detects `connection(` on the highlighted code-frame line. - `ParamClientHookDynamicError` collapsed into `ClientHookDynamicError`. - CLI/build messages: dropped the GSP bullet; added `(does not apply to \`connection()\`)` on the cache bullet. - Docs: removed `For known params, prerender` sections; added a connection caveat on dynamic/metadata-dynamic/viewport-dynamic pages. <!-- NEXT_JS_LLM_PR -->
-
Andrew Clark authored
Previously, a static segment prefetch that hit a route with an unresolved ISR entry could not be served a fallback shell, so the prefetch cache was left cold until the entry regenerated. This enables prefetch requests to be served the ISR fallback shell immediately, so the prefetch cache can be warmed right away instead of waiting. Because the shell is only a partial response, the client retries the prefetch a bounded number of times so it eventually warms the cache with the full (concrete) response once the server finishes regenerating in the background. Only shells that can actually be upgraded are retried — a route with no generateStaticParams never upgrades, so its shell isn't flagged and the client doesn't waste retries on it. The new serving behavior is gated behind the experimental `appShells` flag, so existing behavior is unchanged when it's off. <!-- NEXT_JS_LLM_PR -->
-
next-js-bot[bot] authored
-
Aurora Scharff authored
### What? Adds the Interactive Apps guide (`docs/01-app/02-guides/interactive-apps.mdx`) with a companion [Taskboard app](https://github.com/vercel-labs/async-react-demo). ### Why? There is no end-to-end guide that shows how to coordinate pending work across Server Functions, transitions, optimistic UI, and caching in a single app. ### How? The guide walks through building a task management board in 8 steps, from a plain Server Component app to one with optimistic UI, streaming, caching, and prefetching: 1. Stream slow data with Suspense — promise-passing to split reads into independent boundaries 2. Respond instantly to a toggle — `useOptimistic` + `startTransition` for a priority cycle 3. Filter with pending feedback — `useTransition` + `data-pending` for label chips, action props for `ChipGroup` 4. Add comments with instant feedback — `useOptimistic([])` for a pending-only comment list 5. Move cards between columns — optimistic reducer for drag-and-drop status updates 6. Manage form lifecycle with useActionState — `isPending`, key-based reset, double-transition for dialog close 7. Signal pending deletion to a parent — `useOptimistic(false)` + `data-pending` CSS attribute 8. Make repeat navigation instant — `use cache`, `cacheTag`, `updateTag`, `unstable_prefetch` The companion app lives at [vercel-labs/async-react-demo](https://github.com/vercel-labs/async-react-demo). The `plain` branch is the starting point, `main` has all 8 steps applied. --------- Co-authored-by:
Joseph <joseph.chamochumbi@vercel.com>
-
Sebastian "Sebbie" Silbermann authored
-
Benjamin Woodruff authored
Minor nit: In the worst-case (module id can be an `RcStr` or a u64), this eliminates two `RcStr` clones+drops per iteration of the sort algorithm. The code is cleaner with `sort_by_key`, but `sort_by_key` introduces an artificial lifetime issue that `sort_by` avoids. This is a long-standing and widely documented language issue: https://github.com/rust-lang/rust/issues/34162
-
Benjamin Woodruff authored
-
- 22 Jun, 2026 3 commits
-
-
Jude Gao authored
These two maintainer skills live under `.agents/skills/` alongside the internal dev skills (`flags`, `create-pr`, `react-vendoring`, etc.), all of which carry `metadata.internal: true`. They were missing the flag, so the skill sync pulled them into the external/universal distribution. Adds `metadata.internal: true` to both, matching their siblings. <!-- NEXT_JS_LLM_PR -->
-
next-js-bot[bot] authored
-
Aurora Scharff authored
### What Two small edits in [`skills/next-cache-components-adoption/SKILL.md`](https://github.com/vercel/next.js/blob/canary/skills/next-cache-components-adoption/SKILL.md): 1. Add **App Router only** bail-out above the **Next.js 16.3+** version note in the `## requires` section. The Pages-Router check is the hard bail-out for this skill, so it should run before the version-upgrade guidance. 2. Remove an accidentally duplicated "End of every milestone: summarize and ask" paragraph in `## the shape of the work`. ### Why From a friction log of an agent driving this skill against a Pages Router project: the agent read past the version note, started the upgrade, and only hit the App Router incompatibility several steps in. Surfacing the bail-out first saves that round trip. <!-- NEXT_JS_LLM_PR --> --------- Co-authored-by:
Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
-