Skip to content

[lts-active] Backport docs fixes since v16.4.0 - #100246

Merged
icyJoseph merged 18 commits into
releases/lts/activefrom
backport/docs-fixes-v16.4.0-to-releases-lts-active
Oct 15, 2026
Merged

icyJoseph merged 18 commits into
releases/lts/activefrom
backport/docs-fixes-v16.4.0-to-releases-lts-active

Conversation

@icyJoseph

@icyJoseph icyJoseph commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Backports documentation fixes from canary to releases/lts/active (docs commits since v16.4.0).

Included commits:

wbinnssmith and others added 16 commits October 15, 2026 14:09
## Summary

Mark `next analyze export` and `next-bundle-optimizer` as added in
v16.4. Add version history entries to the AI agents guide, package
bundling guide, and CLI reference.

## Verification

- Prettier and ESLint passed.
- Runtime tests not run (docs only).

<!-- NEXT_JS_LLM -->

---------

Co-authored-by: Jan Kassens <kassens@vercel.com>
(cherry picked from commit eda426e)
## Summary

Remove parentheses from the `navigation` and `prefetch` sidebar labels
so they match the other function API references.

## Verification

- `pnpm prettier --with-node-modules --ignore-path .prettierignore
--check docs/01-app/03-api-reference/04-functions/navigation.mdx
docs/01-app/03-api-reference/04-functions/prefetch.mdx`
- Confirmed no function API reference has a `nav_title` ending in `()`

<!-- NEXT_JS_LLM -->

(cherry picked from commit ea119d2)
## Summary

Clarify that Cache Components does not support the runtime route segment
config, including an explicit Node.js runtime value.

Document the required removal in the migration guide, runtime API
reference, and cacheComponents reference so the guidance matches the
build diagnostic.

## Verification

- Confirmed the existing runtime-edge migration anchor remains
unchanged.
- Not run: runtime tests (documentation-only change).

<!-- NEXT_JS_LLM -->

(cherry picked from commit 2af3c42)
## Summary

Update documentation links for `async-react-demo` and
`next-spa-patterns` after moving the repositories from `vercel-labs` to
the `nextjs` organization. The existing live demo URLs remain unchanged.

## Verification

- `pnpm prettier --with-node-modules --ignore-path .prettierignore
--write <changed files>`
- `npx eslint --config eslint.config.mjs --fix <changed files>`
- Verified the destination repositories are public under `nextjs`

<!-- NEXT_JS_LLM -->

(cherry picked from commit 73ab7c5)
Update links to demos moved to the nextjs org

(cherry picked from commit a5ab0b1)
…Infinity (#96517)

Two small gaps left on the `cacheHandlers` page after #98039 rewrote it.

**`updateTags()` doesn't say what `durations` means.** The table calls
it "optional expiration duration in seconds", but its presence is the
signal: without it the call is an immediate invalidation (`updateTag()`,
single-argument `revalidateTag()`); with it the tags go stale and
entries carrying them may keep serving until `durations.expire`
(`revalidateTag(tag, 'max')`). `revalidation-utils.ts` only passes
`durations` when a profile resolves, so a handler that treats both cases
the same loses stale-while-revalidate for profile-based revalidation.

**The Redis example passes `entry.expire` straight to `EX`.** `EX` needs
a positive integer and `expire` can be `Infinity` ("never expire"), so
that call fails for such entries. The example now omits `EX` when
`expire` isn't finite and rounds up otherwise.

One file, docs only.

---

History: this PR originally corrected the `get()` guidance that told
handlers to drop entries past `revalidate`. #98039 fixed that as part of
the page rewrite, so this PR was rebased and reduced to the two items
above.

(cherry picked from commit 2f6d913)
…de (#100144)

## Summary

The Server Actions guide describes one-at-a-time dispatch as a property
of the client dispatcher, while Mutating Data called it an
implementation detail that may change. Mutating Data now states the
behavior and links to the guide section, so there is one canonical
statement. The guide's note also says explicitly that the server does
not queue Server Actions.

- `fd925c90e80` docs: clarify Server Action dispatch across Mutating
Data and the guide

<!-- NEXT_JS_LLM -->

(cherry picked from commit 36f5ed3)
### What?

Updates six documentation links to point to repositories that moved into
the `nextjs` organization.

### Why?

The old `vercel` and `vercel-labs` repository paths now redirect after
the transfers. The canonical links should use their new locations
directly.

### How?

Replaces the repository URLs for the View Transitions, Public Static
Pages, Nextgram, and On-Demand ISR demos.

Validated the changed files with Prettier and `git diff --check`.

(cherry picked from commit aec2925)
## Summary

`ErrorInfo.error` from `next/error` is typed as `unknown`, but the
`catchError` API reference listed it as `Error` and its examples, plus
the one in Getting Started > Error Handling, read `error.message`
directly, which fails `tsc`.

- `errorInfo` tables (App and Pages): `error` type is now `unknown`,
with a note to narrow before reading `message`.
- All `catchError` examples narrow with `instanceof Error` before
rendering the message, matching the `onRequestError` fix in #94518.

<!-- NEXT_JS_LLM -->

(cherry picked from commit 1193e82)
Small docs fixes in the Pages Router docs:

- `use-router.mdx`: `Node.JS` -> `Node.js`, and `a SSR` -> `an SSR`
- `07-api-routes.mdx`: `a HTTP` -> `an HTTP` (heading and body)

The heading anchor changes from `#sending-a-http-response` to
`#sending-an-http-response`. I checked that nothing in `docs/` links to
the old anchor.

(cherry picked from commit e1b1395)
## Summary

Document that `eslint-config-next@16.4.0` and later supports ESLint 10
with the default React version detection, so users can remove a
`settings.react.version` override added for the `context.getFilename`
error.

Align the Next.js 16 upgrade guide with the ESLint 9 minimum and the
ESLint 10 support boundary.

Finding: https://next-maintainer-agent.vercel.tools/agent-feedback/1854

## Verification

- `prettier --check docs/01-app/03-api-reference/05-config/03-eslint.mdx
docs/01-app/02-guides/upgrading/version-16.mdx`
- `git diff --check`
- `alex docs/01-app/03-api-reference/05-config/03-eslint.mdx
docs/01-app/02-guides/upgrading/version-16.mdx --quiet` (reported only
pre-existing warnings outside the changed lines)
- Not run: `pnpm lint` (docs-only change; targeted formatting and prose
checks run)

<!-- NEXT_JS_LLM -->

(cherry picked from commit f7545a4)
…Redis) (#96622)

**What**:

New example examples/cache-handler-redis-turbo demonstrating Redis as a
shared cache with `@trieb.work/nextjs-turbo-redis-cache`
Shows both cacheHandler (singular, Pages Router ISR) and cacheHandlers
(plural, 'use cache' / cacheComponents: true) — the gap the existing
cache-handler-redis example doesn't cover (neshca is pinned to next <
15)
Includes /cet + /gmt time demo and /use-cache demo with
cacheLife("minutes"), cacheTag, and revalidateTag(..., "max") server
actions
Build-phase no-op handlers so next build works without Redis
docker compose with redis/redis-stack for local dev

**Why:**

The existing examples/cache-handler-redis uses @neshca/cache-handler
(peerDependencies.next: ">= 13.5.1 < 15"), which doesn't support Next.js
16 Cache Components
No existing example in the repo shows cacheComponents: true +
cacheHandlers plural with Redis
`@trieb.work/nextjs-turbo-redis-cache` supports both interfaces, is
compatible with Next.js 15.0.3+ and 16.x, and has ~11K weekly npm
downloads.
This is our well maintained project, that exists for a long time already
and is better maintained than @neshca/cache-handler

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
(cherry picked from commit f173bcc)
## Summary

Follow-up to #100196. `error.js` and `global-error.js` receive whatever
was thrown: Server Component errors arrive as an `Error`, but a value
thrown in a Client Component is passed through as-is. The docs annotated
the prop as `Error & { digest?: string }` and described it as always an
`Error`.

- `error.mdx` and Getting Started > Error Handling: type `error` as
`unknown` in the `error.tsx` and `global-error.tsx` examples, and
describe the prop as the thrown value, with a note to narrow before
reading `message` or `digest`.
- `with-stripe-typescript`: the three `error.tsx` boundaries narrow with
`instanceof Error`. The component is renamed from `Error` to `ErrorPage`
so it no longer shadows the global.

<!-- NEXT_JS_LLM -->

(cherry picked from commit ae63c57)
### What?

Adds a "Testing instant navigations" section to the Playwright guide. It
covers the `instant()` helper from `@next/playwright`: how to install
it,
an example test, and how to enable the testing API when running tests
against a production build.

### Why?

The `instant()` helper is documented in the Instant navigation guide and
the `instant` API reference, but the Playwright guide never mentions it.
People who come to this page to learn how to test Next.js apps with
Playwright won't find out that a helper exists for catching regressions
in
instant navigations.

### How?

- Adds a new section at the end of the Playwright guide, wrapped in
  `<AppOnly>` because the feature requires Cache Components.
- Includes the install command, an example test using `instant()` with
  `page.waitForURL()`, a note about passing `baseURL`, and the
  `exposeTestingApiInProductionBuild` config for production builds.
- Content is based on the existing official docs:
  - https://nextjs.org/docs/app/guides/instant-navigation
-
https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config/instant
-
https://nextjs.org/docs/app/api-reference/config/next-config-js/exposeTestingApiInProductionBuild

(cherry picked from commit a73eee2)
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 4198900

@github-actions github-actions Bot added Documentation Related to Next.js' official documentation. examples Issue was opened via the examples template. labels Oct 15, 2026
@icyJoseph
icyJoseph marked this pull request as ready for review October 15, 2026 12:21
…in dev (#100252)

## Summary

In `next dev`, `'use cache: private'` results are stored in memory,
keyed by the request's cookies and headers, and served to the next
matching request while a fresh result is generated in the background
(#94694). The reference page only described production, where results
are not stored across requests, so a reload in dev that showed the
previous result looked like a bug. This adds one sentence describing the
dev behavior.

Finding: https://next-maintainer-agent.vercel.tools/agent-feedback/2068

<!-- NEXT_JS_LLM -->

(cherry picked from commit 45e09fa)
## Summary

The Pages Router docs had no version 15 or 16 upgrade guides. This adds
both as `source:` stubs that render the App Router guides, and gates the
App Router-only sections with `<AppOnly>`.

- Version 15: Async Request APIs, `runtime` config, `fetch` caching,
Route Handlers, and Client Cache are App Router only. The React 19
minimum is App Router only; a `<PagesOnly>` bullet notes the Pages
Router supports React 18 and 19.
- Version 16: Async Request APIs, async metadata image and sitemap
params, React 19.2 (Canary), Caching APIs, routing and navigation, PPR,
parallel routes `default.js`, and the
`dynamicIO`/`useCache`/`unstable_rootParams` removals are App Router
only. Scroll Behavior Override stays shared (the Pages Router uses the
same helper) and gets a `pages/_document.tsx` example.
- App Router-only checklist items move to an `<AppOnly>` block at the
end of each checklist.

## Verification

- Not run: `prettier` (local install is broken; committed with
`--no-verify`, CI lint covers it)

<!-- NEXT_JS_LLM -->

🤖 Generated with [Claude Code](https://claude.com/claude-code)

(cherry picked from commit 648110d)
@icyJoseph
icyJoseph enabled auto-merge (squash) October 15, 2026 14:41
@icyJoseph
icyJoseph merged commit 6a79d8a into releases/lts/active Oct 15, 2026
58 checks passed
@icyJoseph
icyJoseph deleted the backport/docs-fixes-v16.4.0-to-releases-lts-active branch October 15, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Related to Next.js' official documentation. examples Issue was opened via the examples template.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants