Repository navigation
[pull] canary from vercel:canary - #2096
Merged
Merged
Conversation
## Summary Enable deploy testing for five suites: middleware page extensions, mixed proxy page extensions, false aliases, CSS module ordering, and conflicting service worker registrations. Their deploy-mode assertions check served responses, browser-rendered styles, or a specific remote build failure. ## Verification The retained changes passed [Turbopack deploy CI](https://github.com/vercel/next.js/actions/runs/36188078111) at `293d58d`, including cache-components jobs. Webpack deploy behavior remains unverified. Local formatting and ESLint checks passed. The four restored files match the PR base exactly, and the five retained files are unchanged. A full local bootstrap could not complete because this worktree lacks package-level dependencies (`microbundle`). <!-- NEXT_JS_LLM --> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
## Summary Set the correct HTTP status and redirect location when a prerendered page throws `notFound()`, `unauthorized()`, `forbidden()`, `redirect()`, or `permanentRedirect()` inside Suspense. Preserve the prerendered layout and Suspense fallback so the client can recover at the appropriate error boundary. Redirects take precedence over HTTP access fallbacks. Among access fallbacks, or among redirects, the first observed error wins. The HTML error callback and prerender recovery catch share this rule, so a later fatal not-found error cannot overwrite an already captured redirect. The catch still classifies its own error independently of the selected response. Request-time streaming behavior is unchanged. A dynamic not-found after `connection()` can still return 200. The custom error UI itself is not prerendered and remains a follow-up. Related: [NAR-435](https://linear.app/vercel/issue/NAR-435/set-status-code-on-prerendered-output-whenever-notfound-or-redirect). ## Verification - All 57 production Turbopack tests pass with Cache Components enabled and disabled, with `__NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true`. This includes 44 ordered-error cases covering sibling Suspense boundaries and the outer recovery catch, status/location consistency, and preserved layout/fallback HTML. - Removing the precedence fix causes 22 regression cases to fail. - All 36 existing on-demand prerender recovery tests pass with Cache Components enabled: `NEXT_SKIP_ISOLATE=1 NEXT_TELEMETRY_DISABLED=1 __NEXT_EXPERIMENTAL_STRICT_ROUTE_TYPES=true __NEXT_CACHE_COMPONENTS=true pnpm test-start-turbo test/e2e/app-dir/on-demand-prerender-error-boundary/on-demand-prerender-error-boundary.test.ts`. - Dev gate verified: all 57 tests are skipped. - Local tests used the installed SWC canary.38 binary with Next.js canary.42 and emitted a version mismatch warning. Deploy mode was not run locally. <!-- NEXT_JS_LLM --> --------- Co-authored-by: Jamiboy Mohammad <2085704+jamiboym@users.noreply.github.com>
## Summary To measure how client component loading affects HTML render performance, replace telemetry based on process-global counters and incoming request-body completion. Those boundaries mixed overlapping renders and measured a lifecycle unrelated to HTML production. Scope the counters and reporting context to each HTML-producing render. Start tracking before SSR, finish dynamic measurements at React readiness (Node `onAllReady` / Web `allReady`), and finish prerendering when the prerender operation returns. Preparation, action execution, and dedicated Flight rendering do not start tracking. DATA-only resumes finish tracking locally without waiting for output; an empty tracker emits no span. HTML rendered after a form action is still measured. Already-started loads may settle and report afterward without keeping the response open. Preserve the first-write performance snapshot, but remove metrics stream wrapping and binding. This advances the larger effort to remove req/res lifecycle assumptions from App Router rendering without adding telemetry to `after()`. Behavioral tests cover overlapping renders in both completion orders, HTML after a form POST, enhanced actions that only produce Flight, and HTML readiness while unused Flight content remains blocked. ## Verification - Confirmed both new boundary regressions failed before the runtime change. - Five behavioral metrics cases pass in development and production with both Turbopack and Webpack. - Full production Turbopack instrumentation suite: 109 passed, 13 existing skips. - Focused logger/response-piping units: 11 passed. Full repository build, package/root types, scoped Prettier, ESLint, and diff checks pass. - A broader unit run passed 3,065 tests but hit three macOS `/var` versus `/private/var` assertions in unchanged TypeScript CLI tests. Existing Node response-disconnect propagation to upstream SSR is unchanged; this PR does not claim to fix cancellation. <!-- NEXT_JS_LLM -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )