build: show non-200 prerender statuses - #97125
Draft
DavidIlie wants to merge 2 commits into
Draft
Conversation
Contributor
Stats from current PR🔴 1 regression, 1 improvement
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
Build Cache
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (2 files)Files with changes:
View diffspages-api.ru..time.prod.jsDiff too large to display pages.runtime.prod.jsDiff too large to display 📎 Tarball URLCommit: 3ff110a |
Contributor
Tests PassedCommit: 3ff110a |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What?
Show the HTTP status of user-authored routes that finish prerendering with a non-
200response:Generated route previews remain bounded. A non-
200path is promoted into the preview when possible, and statuses that remain hidden are summarized on the existing[+N more paths]row.Why?
Cache Components can legitimately capture
notFound(), a redirect, or another response status in a static or partial prerender. Until now, the route tree displayed the normal static-shell symbol without surfacing that status. A route could therefore look healthy innext buildeven though its exported response was a404.This is particularly difficult to spot when one Docker image is built with one set of server environment variables and started with another: changing the runtime value does not regenerate the build artifact.
How?
Carry the prerender status through the in-memory export result into
PageInfo, then add an informational annotation inprintTreeView.The value is diagnostic-only. It does not change deployment metadata, the prerender manifest, or runtime response behavior. Successful
200routes and the framework-owned/_not-foundroute remain unannotated.Verification
pnpm --filter=next buildpnpm test-start-turbo test/production/app-dir/build-output-tree-view/build-output-tree-view.test.tspnpm test-start-webpack test/production/app-dir/build-output-tree-view/build-output-tree-view.test.tspnpm --filter=next types