[PP] Surface URL data during prefetching as an Instant insight with rule page#95365
Conversation
Tests PassedCommit: 6c3f6df |
Stats from current PRWarning No stats were collected for Webpack because its stats job did not complete (it failed, was cancelled, or timed out). The results below only cover the bundlers that finished. 🟢 1 improvement
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (11 files)Files with changes:
View diffsapp-page-exp..ntime.dev.jsfailed to diffapp-page-exp..time.prod.jsDiff too large to display app-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsDiff too large to display app-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsDiff too large to display app-page.runtime.dev.jsfailed to diffapp-page.runtime.prod.jsDiff too large to display pages-api-tu..time.prod.jsDiff too large to display pages-turbo...time.prod.jsDiff too large to display server.runtime.prod.jsDiff too large to display 📎 Tarball URLCommit: 6c3f6df |
…dling during prefetching
…ing and metadata generation
There was a problem hiding this comment.
Pull request overview
This PR adds a dedicated documentation Insight for “URL data during prefetching” (the instant shell / partial prefetching validation case), and updates the dev overlay + error messages to link to it and use “URL data” terminology consistently.
Changes:
- Added new Insight page
instant-shell-link-dataand rewired the navigation-time link-data body error to point to it. - Updated dev overlay classification/copy and Instant Guidance cards/snippets/links for the new Insight and terminology.
- Updated related Insights lists across sibling error pages and expanded overlay/test coverage for the new link variant.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/next/src/server/app-render/blocking-route-messages.ts | Rewords link-data errors to “URL data”, updates body error docs link to the new Insight, and adjusts metadata/viewport link error copy. |
| packages/next/src/next-devtools/dev-overlay/container/errors.tsx | Updates overlay variant detection and adds special-case classification for the new prefetching URL-data message; updates displayed header/copy. |
| packages/next/src/next-devtools/dev-overlay/container/errors.test.ts | Adds tests for classifying the new navigation-time link body error and marking it as an instant-navigation error. |
| packages/next/src/next-devtools/dev-overlay/components/instant/instant-guidance-data.ts | Updates blocking-route link fix cards to point to the new Insight and adds a dedicated explanation string for link-prefetch cases. |
| packages/next/src/next-devtools/dev-overlay/components/instant/instant-guidance-data.test.ts | Extends parameterized suites to include link variants for blocking-route/metadata/viewport guidance. |
| packages/next/errors.json | Adds new error-code entries for the updated URL-data messages. |
| errors/instant-unrendered-segment.mdx | Updates “Related Insights” entries to include the new URL-data Insight and align wording. |
| errors/instant-shell-link-data.mdx | New Insight page describing URL-data usage during shared prefetching and providing fix guidance. |
| errors/instant-link-prefetch-partial.mdx | Adds the new URL-data Insight to “Related Insights”. |
| errors/blocking-prerender-viewport-runtime.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-viewport-dynamic.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-runtime.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-random.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-random-client.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-metadata-runtime.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-metadata-dynamic.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-dynamic.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-current-time.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-current-time-client.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-crypto.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-crypto-client.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
| errors/blocking-prerender-client-hook.mdx | Updates “Related Insights” wording + adds the new URL-data Insight. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…data handling during prefetching
…g during prefetching
…avigation insights
…ing in instant validation tests
…uring navigation and prefetching
…uring prefetching
…blocking navigation
… extraction and URL data handling
…tion and instant navigation
…blocking navigation
What?
Adds the Instant Insight + rule page for the Partial Prefetching shell validation (Janka's #95151): with
partialPrefetchingon, a route that readsparams/searchParamsoutside<Suspense>blocks the extraction of the per-route App Shell that every link to the route shares. Surfaced as an Instant insight (not a redbox), with two fix cards: Stream (wrap in<Suspense>) · Allow blocking route (instant = false).The insight fires both at link-prefetch time and during a client-side navigation, so it covers a
<Link prefetch>into the route as well as a plain client navigation to it.Demos:
<Link prefetch>to agenerateStaticParamsroute that awaitsparamsunguarded.[slug]route that readsparamsoutside<Suspense>.searchParamsoutside<Suspense>.Follow-up: #95389 documents the route-side audit in the Adopting Partial Prefetching guide (draft, to be coordinated).
How?
Learn more:link texts (target title for guides, bare code name for API references), "App Shell" used consistently, CLS guidance reframed as "minimizing layout shift", prose cleanups (no semicolons, no code-initial sentences), and the insight-error-page skill updated to match.errors/instant-shell-url-data.mdxrule page, structured like the rest of the insight family (blocking-prerender-client-hook,instant-link-prefetch-partial); added to every page's Related Insights. New URL data glossary entry ("varies per link, not per session"), linked from the page.createLinkBodyErrorInNavigationre-pointed to the page and classified as a navigation-time insight (inNavigation→ Instant tab) using the sharedlinkCardsfix cards.[stream] Provide a placeholder with <Suspense fallback={...}> around the data accessand[block] Set export const instant = false to allow a blocking route. The shell mechanics are explained on the docs page rather than in the headline.ignore) to Allow blocking route (groupblock), matching theblocking-prerender-*family:instant = falsemarks the segment as allowed to block rather than opting the route out of validation.-metadata-runtime/-viewport-runtimepages unchanged.errors.jsonregenerated append-only (codes 1407-1409), and the docs opt-out wording updated to the new silence-free phrasing.isInstantNavigationError.