Skip to content

[PP] Surface URL data during prefetching as an Instant insight with rule page#95365

Merged
aurorascharff merged 35 commits into
canaryfrom
codex/instant-shell-link-data
Jul 8, 2026
Merged

[PP] Surface URL data during prefetching as an Instant insight with rule page#95365
aurorascharff merged 35 commits into
canaryfrom
codex/instant-shell-link-data

Conversation

@aurorascharff

@aurorascharff aurorascharff commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What?

Adds the Instant Insight + rule page for the Partial Prefetching shell validation (Janka's #95151): with partialPrefetching on, a route that reads params/searchParams outside <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:

  • 99-link-params-gsp<Link prefetch> to a generateStaticParams route that awaits params unguarded.
  • 117-subnav-params — client-side navigation into a [slug] route that reads params outside <Suspense>.
  • 118-subnav-search-params — client-side navigation into a route that reads searchParams outside <Suspense>.

Follow-up: #95389 documents the route-side audit in the Adopting Partial Prefetching guide (draft, to be coordinated).

How?

  • Family-wide polish across all 16 insight pages while aligning the new one: consistent "Verifying the fix" wording, normalized 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.
  • New errors/instant-shell-url-data.mdx rule 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.
  • createLinkBodyErrorInNavigation re-pointed to the page and classified as a navigation-time insight (inNavigation → Instant tab) using the shared linkCards fix cards.
  • Common insight format for the message: headline "Next.js encountered URL data outside of Suspense", consequence "may prevent the navigation from being instant, leading to a slower user experience" ("may", since boundaries or a runtime prefetch can still keep the navigation instant), and the two fixes phrased as [stream] Provide a placeholder with <Suspense fallback={...}> around the data access and [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.
  • Second fix reframed from "Disable validation" (group ignore) to Allow blocking route (group block), matching the blocking-prerender-* family: instant = false marks the segment as allowed to block rather than opting the route out of validation.
  • Metadata/viewport variants: only the headline term is aligned ("link data" → "URL data") plus a small grammar fix; framing, fix cards, and docs URLs stay on the existing -metadata-runtime/-viewport-runtime pages unchanged.
  • errors.json regenerated append-only (codes 1407-1409), and the docs opt-out wording updated to the new silence-free phrasing.
  • e2e snapshots updated for all four configs (dev/start × default/partial-prefetching); unit tests for the matcher, cards, classification, and isInstantNavigationError.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 6c3f6df

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Stats from current PR

Warning

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

Metric Canary PR Change Trend
node_modules Size 515 MB 514 MB 🟢 533 kB (0%) █████
📊 All Metrics
📖 Metrics Glossary

Dev Server Metrics:

  • Listen = TCP port starts accepting connections
  • First Request = HTTP server returns successful response
  • Cold = Fresh build (no cache)
  • Warm = With cached build artifacts

Build Metrics:

  • Fresh = Clean build (no .next directory)
  • Cached = With existing .next directory

Change Thresholds:

  • Time: Changes < 50ms AND < 10%, OR < 2% are insignificant
  • Size: Changes < 1KB AND < 1% are insignificant
  • All other changes are flagged to catch regressions

⚡ Dev Server

Metric Canary PR Change Trend
Cold (Listen) 824ms 814ms ▂▁▁▂▁
Cold (Ready in log) 817ms 799ms ▁▁▁▁▁
Cold (First Request) 1.426s 1.371s ▁▁▁▁▁
Warm (Listen) 815ms 816ms ▂▁▂▁▁
Warm (Ready in log) 818ms 812ms ▁▁▁▁▁
Warm (First Request) 649ms 627ms ▁▁▁▁▁

⚡ Production Builds

Metric Canary PR Change Trend
Fresh Build 5.866s 5.914s ▃▁▁▁▁
Cached Build 5.856s 5.817s ▁▁▂▁▁
📦 Production Builds (Webpack) (Legacy)

📦 Production Builds (Webpack)

Metric Canary PR Change Trend
node_modules Size 515 MB 514 MB 🟢 533 kB (0%) █████
📦 Bundle Sizes

Bundle Sizes

⚡ Turbopack

Client

Main Bundles
Canary PR Change
03gmyxr7dukvs.js gzip 10.3 kB N/A -
040t1q17lo593.js gzip 8.77 kB N/A -
07qom_is9itxt.js gzip 3.39 kB N/A -
0bb0vtp8dwsez.js gzip 450 B N/A -
0cz1d0mv5g_q7.js gzip 39.4 kB 39.4 kB
0dtu6lqljk3wx.js gzip 162 B N/A -
0f142f6nu6_ke.js gzip 162 B N/A -
0gb9135748t_r.js gzip 71 kB N/A -
0nxqz3q165m2l.js gzip 220 B N/A -
0qr-1tnb7_hg5.js gzip 5.72 kB N/A -
0uf40nhi0wmhn.js gzip 158 B N/A -
0uilzvklme4ea.js gzip 8.76 kB N/A -
0z0y83mfx-l-h.js gzip 10 kB N/A -
15ok8ydf274z0.js gzip 10.6 kB N/A -
16cqqcigykfea.js gzip 13.6 kB N/A -
17h18zxt1915l.js gzip 1.46 kB N/A -
18snzwix9_m92.js gzip 7.4 kB N/A -
1b0n6txgcgpt6.js gzip 155 B N/A -
1b3wc7qdlknam.js gzip 155 B N/A -
1elt1qium-r2m.css gzip 115 B 115 B
1fq1h7dxad4cv.js gzip 9.44 kB N/A -
1fym-adbk_69_.js gzip 13.1 kB N/A -
1g80-jfls9qyr.js gzip 13.2 kB N/A -
1gav7nfh4y8ln.js gzip 8.76 kB N/A -
1gn-m7091-3lo.js gzip 168 B N/A -
1tfr9xysn8ev2.js gzip 157 B N/A -
23g0ps14sja78.js gzip 157 B N/A -
25o_dyxl0-0-b.js gzip 157 B N/A -
2bp3m17plek4d.js gzip 155 B N/A -
2dk7r44ecy6ug.js gzip 45 kB N/A -
2dup3ykr13rl4.js gzip 153 B N/A -
2rypqffktcxqh.js gzip 8.69 kB N/A -
2uqsizxtehgqf.js gzip 8.79 kB N/A -
2vzktdqwbijqc.js gzip 8.74 kB N/A -
2zbrh4ffpdf3h.js gzip 158 B N/A -
3c244akvx_-be.js gzip 8.74 kB N/A -
3dmlemitx3ef3.js gzip 2.29 kB N/A -
3fxxxg9ms4r25.js gzip 65.5 kB N/A -
3pn8yy3xzdvhd.js gzip 158 B N/A -
4237vdj6eyslt.js gzip 8.7 kB N/A -
turbopack-04..rq9z.js gzip 3.85 kB N/A -
turbopack-07..y1mu.js gzip 3.85 kB N/A -
turbopack-0c..n1ju.js gzip 3.83 kB N/A -
turbopack-0h..3cg-.js gzip 3.85 kB N/A -
turbopack-1f..4hb-.js gzip 3.85 kB N/A -
turbopack-1g..xg_g.js gzip 3.85 kB N/A -
turbopack-1r..qusy.js gzip 3.85 kB N/A -
turbopack-2_..irjy.js gzip 3.85 kB N/A -
turbopack-23..jaf6.js gzip 3.86 kB N/A -
turbopack-2f..b-j_.js gzip 3.85 kB N/A -
turbopack-2n..ce09.js gzip 3.85 kB N/A -
turbopack-2p..dzbt.js gzip 3.85 kB N/A -
turbopack-2w..1dt7.js gzip 3.85 kB N/A -
turbopack-43..rapx.js gzip 3.85 kB N/A -
00tc16j5-eos9.js gzip N/A 1.46 kB -
04k1dnw6y-sgq.js gzip N/A 160 B -
04u34gycevlzk.js gzip N/A 51.2 kB -
0frxqutb6-vax.js gzip N/A 10.3 kB -
0gaw1gmpwuwkn.js gzip N/A 8.8 kB -
0n8vgrgx6gsx2.js gzip N/A 65.5 kB -
0rbtcmwiuz-3x.js gzip N/A 157 B -
1_jfzs24krjbo.js gzip N/A 156 B -
12zyjjmq4oad1.js gzip N/A 5.72 kB -
1cfirxwnd7m9h.js gzip N/A 161 B -
1d14swk91dglf.js gzip N/A 157 B -
1k9cc4-gpa2cx.js gzip N/A 13.1 kB -
1n59uogejo81s.js gzip N/A 10.3 kB -
1npei3hlexdv3.js gzip N/A 9.99 kB -
1ssuiwj_rnpc5.js gzip N/A 8.77 kB -
1wb808_e_-w3u.js gzip N/A 155 B -
2-phc9obd3nyd.js gzip N/A 8.77 kB -
24utq57r3l1cw.js gzip N/A 8.7 kB -
28r3lfbanlqsz.js gzip N/A 154 B -
2fhjq6ek3srmr.js gzip N/A 8.69 kB -
2g0t7upz_v-hf.js gzip N/A 10.6 kB -
2ia9qqy99aie9.js gzip N/A 13.6 kB -
2oza28kdqvoay.js gzip N/A 8.74 kB -
2petq82fjj2-5.js gzip N/A 71 kB -
2rv500jdndh2l.js gzip N/A 156 B -
2ty8muxbqewy-.js gzip N/A 154 B -
2zh8-mmhujy8o.js gzip N/A 2.29 kB -
30h_m0irj-q6p.js gzip N/A 221 B -
37ejbfx1u9lpo.js gzip N/A 8.75 kB -
38c63ct4i1cy7.js gzip N/A 449 B -
396nht7itx-uq.js gzip N/A 153 B -
3drpf422jknfx.js gzip N/A 14.5 kB -
3fospa9508caf.js gzip N/A 155 B -
3hd1us4ordyc9.js gzip N/A 13.2 kB -
3jimpal3lvz5e.js gzip N/A 9.44 kB -
3sopw705rkml5.js gzip N/A 157 B -
3urjgcevdqj17.js gzip N/A 169 B -
3wb4pe4z4-aim.js gzip N/A 8.77 kB -
turbopack-05..bfnr.js gzip N/A 3.74 kB -
turbopack-07..idrr.js gzip N/A 3.74 kB -
turbopack-08..mpl7.js gzip N/A 3.74 kB -
turbopack-0s..944p.js gzip N/A 3.74 kB -
turbopack-1k..sc_y.js gzip N/A 3.74 kB -
turbopack-2_..ibpn.js gzip N/A 3.74 kB -
turbopack-2l..lm-v.js gzip N/A 3.74 kB -
turbopack-2l..um__.js gzip N/A 3.72 kB -
turbopack-37..fdi3.js gzip N/A 3.75 kB -
turbopack-39..5fjh.js gzip N/A 3.74 kB -
turbopack-3o..3o_l.js gzip N/A 3.74 kB -
turbopack-3t..fc26.js gzip N/A 3.74 kB -
turbopack-3u..0ekr.js gzip N/A 3.74 kB -
turbopack-40..fson.js gzip N/A 3.74 kB -
Total 448 kB 467 kB ⚠️ +18.7 kB

Server

Middleware
Canary PR Change
middleware-b..fest.js gzip 730 B 722 B 🟢 8 B (-1%)
Total 730 B 722 B ✅ -8 B
Build Details
Build Manifests
Canary PR Change
_buildManifest.js gzip 434 B 436 B
Total 434 B 436 B ⚠️ +2 B

🔄 Shared (bundler-independent)

Runtimes
Canary PR Change
app-page-exp...dev.js gzip 362 kB 361 kB
app-page-exp..prod.js gzip 200 kB 200 kB
app-page-tur...dev.js gzip 361 kB 360 kB
app-page-tur..prod.js gzip 200 kB 199 kB
app-page-tur...dev.js gzip 358 kB 357 kB
app-page-tur..prod.js gzip 198 kB 197 kB
app-page.run...dev.js gzip 358 kB 357 kB
app-page.run..prod.js gzip 198 kB 198 kB
app-route-ex...dev.js gzip 79.1 kB 79.1 kB
app-route-ex..prod.js gzip 53.6 kB 53.6 kB
app-route-tu...dev.js gzip 79.1 kB 79.1 kB
app-route-tu..prod.js gzip 53.6 kB 53.6 kB
app-route-tu...dev.js gzip 78.7 kB 78.7 kB
app-route-tu..prod.js gzip 53.4 kB 53.4 kB
app-route.ru...dev.js gzip 78.7 kB 78.7 kB
app-route.ru..prod.js gzip 53.4 kB 53.4 kB
dist_client_...dev.js gzip 324 B 324 B
dist_client_...dev.js gzip 326 B 326 B
dist_client_...dev.js gzip 318 B 318 B
dist_client_...dev.js gzip 317 B 317 B
pages-api-tu...dev.js gzip 45.2 kB 45.2 kB
pages-api-tu..prod.js gzip 34 kB 34 kB
pages-api.ru...dev.js gzip 45.2 kB 45.2 kB
pages-api.ru..prod.js gzip 33.9 kB 33.9 kB
pages-turbo....dev.js gzip 54.7 kB 54.7 kB
pages-turbo...prod.js gzip 39.6 kB 39.6 kB
pages.runtim...dev.js gzip 54.7 kB 54.7 kB
pages.runtim..prod.js gzip 39.6 kB 39.6 kB
server.runti..prod.js gzip 65.1 kB 65.1 kB
use-cache-pr...dev.js gzip 71.3 kB 71.3 kB
use-cache-pr...dev.js gzip 71.3 kB 71.3 kB
use-cache-pr...dev.js gzip 69.6 kB 69.6 kB
use-cache-pr...dev.js gzip 69.6 kB 69.6 kB
Total 3.46 MB 3.45 MB ✅ -3.87 kB
📝 Changed Files (11 files)

Files with changes:

  • app-page-exp..ntime.dev.js
  • app-page-exp..time.prod.js
  • app-page-tur..ntime.dev.js
  • app-page-tur..time.prod.js
  • app-page-tur..ntime.dev.js
  • app-page-tur..time.prod.js
  • app-page.runtime.dev.js
  • app-page.runtime.prod.js
  • pages-api-tu..time.prod.js
  • pages-turbo...time.prod.js
  • server.runtime.prod.js
View diffs
app-page-exp..ntime.dev.js
failed to diff
app-page-exp..time.prod.js

Diff too large to display

app-page-tur..ntime.dev.js
failed to diff
app-page-tur..time.prod.js

Diff too large to display

app-page-tur..ntime.dev.js
failed to diff
app-page-tur..time.prod.js

Diff too large to display

app-page.runtime.dev.js
failed to diff
app-page.runtime.prod.js

Diff too large to display

pages-api-tu..time.prod.js

Diff too large to display

pages-turbo...time.prod.js

Diff too large to display

server.runtime.prod.js

Diff too large to display

📎 Tarball URL
https://vercel-packages.vercel.app/next/commits/6c3f6df252a8ef1e08aee400620a51c439dab58e/next

Commit: 6c3f6df

@vercel vercel Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestion:

Link body instant-navigation error message was reworded to "encountered URL data during prefetching", but isBlockingRouteInNavError was not updated, so getInstantErrorRoute returns null for these errors and stale link-data instant errors are never cleared on navigation.

Fix on Vercel

@aurorascharff aurorascharff marked this pull request as ready for review July 1, 2026 16:17
Copilot AI review requested due to automatic review settings July 1, 2026 16:17
@aurorascharff aurorascharff marked this pull request as draft July 1, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-data and 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.

Comment thread packages/next/src/next-devtools/dev-overlay/container/errors.tsx Outdated
Comment thread packages/next/src/server/app-render/blocking-route-messages.ts Outdated
Comment thread packages/next/errors.json Outdated
Comment thread errors/instant-shell-link-data.mdx Outdated
Comment thread test/e2e/app-dir/instant-validation/instant-validation.test.ts Outdated
@aurorascharff aurorascharff marked this pull request as draft July 2, 2026 13:37
@aurorascharff aurorascharff requested a review from lubieowoce July 2, 2026 15:13
@aurorascharff aurorascharff changed the title docs(errors): add instant-shell-link-data insight page and wire the overlay [PP] Surface URL data during prefetching as an Instant insight with rule page Jul 2, 2026
Comment thread test/e2e/app-dir/instant-validation/instant-validation.test.ts Outdated
@aurorascharff aurorascharff marked this pull request as draft July 6, 2026 14:13
@aurorascharff aurorascharff marked this pull request as ready for review July 6, 2026 19:11
@aurorascharff aurorascharff requested a review from Copilot July 6, 2026 19:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.

Comment thread packages/next/src/server/app-render/blocking-route-messages.ts
Comment thread packages/next/src/next-devtools/dev-overlay/container/errors.tsx
Comment thread packages/next/src/next-devtools/dev-overlay/container/errors.tsx Outdated
Comment thread packages/next/src/next-devtools/dev-overlay/container/errors.tsx Outdated
Comment thread errors/instant-shell-url-data.mdx Outdated
Comment thread docs/01-app/04-glossary.mdx Outdated
@aurorascharff aurorascharff merged commit 76628b4 into canary Jul 8, 2026
128 of 129 checks passed
@aurorascharff aurorascharff deleted the codex/instant-shell-link-data branch July 8, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants