Skip to content

[pull] canary from vercel:canary - #1412

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

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

Conversation

@pull

@pull pull Bot commented Sep 21, 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 : )

martinfrancois and others added 3 commits September 21, 2026 00:58
### Fixing a bug

Nothing reads the two fields `hasWarnings` and `warnings` on
`TypeCheckResult`.

`verifyAndRunTypeScript` has four callers:

- `build/type-check.ts` only reads `inputFilesCount`, `totalFilesCount`
and `incremental`
- `next-test` only reads `version`
- `setup-dev-bundler` only reads `version`
- `next-typegen` throws the result away

`warnings` is also always empty. It looks for diagnostics with the
`Warning` category, but I checked, and TypeScript 6.0.2 has no messages
in that category. Deprecation messages use `Suggestion` instead.

So on every build, we filtered and formatted every diagnostic to build a
list that was always empty, and that nobody read.

So I'm suggesting removing it instead, as it is clearly not being used.
I also checked the GitHub code search across all public repositories and
couldn't find anyone using either of them. That aside, it also never
really worked correctly, as it would always return `hasWarnings: true`
even if `warnings` was empty.

No test added since the fields are being removed. Also since this is
such a small change I didn't create an issue to link here, I'd be happy
to file one if you prefer me to.

Thanks for the hard work and taking the time for reviewing this PR! 😊
## Summary

Use structural React keys during server rendering so an HTML prerender
can resume without rewriting React's postponed state when route params
become known. Browser keys and router-cache identity are unchanged.

For example, `/products/[slug]` previously prerendered layout boundaries
with a key containing an opaque slug placeholder. Resuming
`/products/shoe` produced a different key, so Next.js substituted `shoe`
into the serialized React state before handing it back to React. Both
server passes now use `slug|d`. The browser still uses `slug|shoe|d`,
preserving template remounts and back/forward state behavior.

The server only renders the active entry at each layout-router position,
so it does not need parameter values to distinguish cached browser
entries. React keys are not embedded in the HTML; hydration derives its
concrete keys from the request's route state.

- Use segment name/type for server layout keys and structural route
paths for the server head key. Server keys always omit search params.
The existing browser-module variant mechanism selects the concrete key
implementation for browser bundles in both Webpack and Turbopack.
- Remove placeholder substitution and the request-params argument from
postponed-state parsing. Persist only fallback param names for render
staging; React's postponed state no longer needs to be searched or
rewritten.
- Simplify the remaining opaque fallback map to param name →
placeholder. Its dynamic-param type slot is unused after removing
interpolation. Parameter wrappers still control suspension; this does
not make unknown params available to application code.
- Test server and browser keys directly, including catch-all/intercepted
segments and search params. Update the action-only resume fixture's
single assertion on the resume-metadata format so its three cases reach
their behavioral checks for action execution, revalidation, and
`notFound()` with names-only metadata.

This refactor is independently landable against `canary` and is now the
base of the parameter-matching stack: #98944#98891#98892#98893#97393. It supersedes #98890. It retains internal opaque placeholders
but removes their role in matching React's postponed state. No new
integration fixtures are needed.

## Verification

Latest cleanup:

- 126 focused unit tests and 4 snapshots pass in both default and Cache
Components/Webpack configurations.
- 34 production Webpack tests pass across `fallback-shells`,
`partial-fallback-shell-upgrade`,
`action-only-fallback-resume-data-cache`, and
`resuming-head-runtime-search-param`; 4 existing tests remain skipped.
The three action-only resume cases now reach and pass their behavioral
assertions.

Earlier commits also passed existing production and dev Webpack coverage
for back/forward state, template remounts, base-path params,
nested/parallel/intercepted routes, form-state hydration, and
standalone/edge output.

A reviewer verified this head under Turbopack using a native binary
built from the same commit: a broader unit selection passed (144 tests,
the focused set above plus the remaining router-reducer suites), the
`packages/next` type check was clean, and 33 production e2e tests passed
across `fallback-shells`, `partial-fallback-shell-upgrade`, and
`action-only-fallback-resume-data-cache`.

<!-- NEXT_JS_LLM -->
@pull pull Bot locked and limited conversation to collaborators Sep 21, 2026
@pull pull Bot added the ⤵️ pull label Sep 21, 2026
@pull
pull Bot merged commit c20c1d4 into code:canary Sep 21, 2026
6 of 9 checks passed
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.

2 participants