Skip to content
Open
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0f0aa80
Clear instant validation errors on route change + nav body variants
aurorascharff May 14, 2026
68a47a2
Show navigation-specific headline + explanation in dev overlay
aurorascharff May 14, 2026
7917001
Detect in-navigation errors via stable message substrings
aurorascharff May 14, 2026
aee125a
Detect dev overlay navigation via history events, not usePathname
aurorascharff May 14, 2026
80685ae
Trim comments
aurorascharff May 14, 2026
32b16b9
add missing reducer action
aurorascharff May 14, 2026
bdf8d80
Update tests
aurorascharff May 14, 2026
8ae10a7
Update tests
aurorascharff May 14, 2026
b155b1a
Merge branch 'canary' of github.com:vercel/next.js into aurorascharff…
aurorascharff May 14, 2026
7bbd860
Update snapshots for in-navigation factory wording
aurorascharff May 14, 2026
b221f22
Update build-mode snapshots for in-navigation factory wording
aurorascharff May 14, 2026
bf68fea
Align InNavigation factory wording, extract isBlockingRouteInNavError
aurorascharff May 14, 2026
6e04312
Merge branch 'canary' into aurorascharff/instant-nav-error-clear
aurorascharff May 14, 2026
84c089f
Merge remote-tracking branch 'origin/canary' into aurorascharff/insta…
aurorascharff May 14, 2026
1b2e9c5
Use state.page for clear-on-nav + update unit tests
aurorascharff May 14, 2026
bb7fa35
Fix snapshot indentation and drop test/tmp prefix
aurorascharff May 14, 2026
aa2d6ef
Skip first state.page transition when clearing instant errors on nav
aurorascharff May 14, 2026
d8449f0
Align runtime-body in-navigation fix-order with the SSR variant
aurorascharff May 14, 2026
4e4406d
Fix `code`/`description` indent in level-* snapshots
aurorascharff May 14, 2026
b1876c8
Match sibling indent for code/description in remaining level-* snapshots
aurorascharff May 14, 2026
2b32f5d
Update build-mode CLI snapshots for in-navigation factory wording
aurorascharff May 14, 2026
e69e4ad
Revert SSR-only snapshots in level-manual-warning to initial-render w…
aurorascharff May 14, 2026
e7b2f5b
fix failing tests
aurorascharff May 15, 2026
08f62f9
Handle instant errors more cleanly
aurorascharff May 15, 2026
a579c3d
Merge branch 'canary' of github.com:vercel/next.js into aurorascharff…
aurorascharff May 15, 2026
6d93b2d
Match dynamic route templates when clearing instant errors on nav
aurorascharff May 15, 2026
b36f9f0
Use shared route-regex helper for template matching
aurorascharff May 15, 2026
5f695d5
Add unit test
aurorascharff May 16, 2026
d157b9e
Remove comments
aurorascharff May 16, 2026
de53dfc
Refine fix cards and messages according to feedback
aurorascharff May 16, 2026
00e6f2c
Update messages
aurorascharff May 16, 2026
1900b73
Merge branch 'canary' of github.com:vercel/next.js into aurorascharff…
aurorascharff May 18, 2026
b5daeb6
Use loading icon for Block group and fix instant validation snapshots
aurorascharff May 18, 2026
b8a0ae9
fix sync-IO snapshot codes
aurorascharff May 18, 2026
fb66c4e
fix failing e2e tests
aurorascharff May 18, 2026
53f18f5
fix snapshot test failures
aurorascharff May 18, 2026
83f925e
fix remaining viewport error code snapshots
aurorascharff May 18, 2026
fd256a0
Refine syncio messages
aurorascharff May 18, 2026
9e287ae
Delete unused icon
aurorascharff May 18, 2026
96f7844
Merge remote-tracking branch 'origin/canary' into aurorascharff/revam…
aurorascharff May 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions packages/next/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,28 @@
"1249": "Route \"%s\": Next.js encountered uncached data during the initial render or a navigation.\\n\\n\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\nWays to fix this:\\n - Cache the data access with \\`\"use cache\"\\`\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1250": "Route \"%s\": Next.js encountered runtime data during the initial render or a navigation.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\nWays to fix this:\\n - Use \\`generateStaticParams\\` to make route params static\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1251": "Route \"%s\": Next.js encountered runtime data during the initial render or a navigation.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\nWays to fix this:\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - Use \\`generateStaticParams\\` to make route params static\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1252": "\\`experimental.cssChunking: \"graph\"\\` is only supported with Turbopack. Please remove the option or run Next.js with Turbopack in %s.",
"1253": "\\`experimental.cssChunking: \"strict\"\\` is only supported with webpack. Please remove the option or run Next.js with webpack in %s.",
"1254": "\\`experimental.cssChunking: false\\` is only supported with webpack. Please remove the option or run Next.js with webpack in %s."
"1252": "Route \"%s\": Next.js encountered runtime data in \\`generateViewport()\\`.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` in \\`generateViewport()\\` prevents the page from being prerendered, leading to a slower user experience.\\n\\nWays to fix this:\\n - Use a static viewport export instead of \\`generateViewport()\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport",
"1253": "Route \"%s\": Next.js encountered uncached or runtime data in \\`generateViewport()\\`.\\n\\nThis prevents the page from being prerendered, leading to a slower user experience.\\n\\nWays to fix this:\\n - Use a static viewport export instead of \\`generateViewport()\\`\\n - Cache the viewport data with \\`\"use cache\"\\` in \\`generateViewport()\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport",
"1254": "Route \"%s\": Next.js encountered uncached or runtime data during the initial render.\\n\\n\\`fetch(...)\\`, \\`cookies()\\`, \\`headers()\\`, \\`params\\`, \\`searchParams\\`, or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking navigation and leading to a slower user experience.\\n\\nWays to fix this:\\n - Cache the data access with \\`\"use cache\"\\`\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - If params are known, prerender them with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1255": "Route \"%s\": Next.js encountered uncached data in \\`generateViewport()\\`.\\n\\n\\`fetch(...)\\` or \\`connection()\\` in \\`generateViewport()\\` prevents the page from being prerendered, leading to a slower user experience.\\n\\nWays to fix this:\\n - Cache the viewport data with \\`\"use cache\"\\` in \\`generateViewport()\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport",
"1256": "Route \"%s\": Next.js encountered %s in a Client Component.\\n\\nThis value would be evaluated during the prerender, instead of recomputed on each visit.\\n\\nWays to fix this:\\n - Wrap the Client Component in \\`<Suspense fallback={...}>\\`\\n - Move the read into a \\`useEffect\\` or event handler\\n%s\\nLearn more: %s",
"1257": "Route \"%s\": Next.js encountered runtime data during the initial render.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking navigation and leading to a slower user experience.\\n\\nWays to fix this:\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - If params are known, prerender them with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1258": "Route \"%s\": Next.js encountered runtime data during the initial render or a navigation.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\nWays to fix this:\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - If params are known, prerender them with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1259": "Route \"%s\": Next.js encountered %s while prerendering.\\n\\nThis value can change between renders, so it must be either prerendered or computed later.\\n\\nWays to fix this:\\n - Render at request time by adding a dynamic data access (e.g. \\`await connection()\\`) before this call\\n - Prerender and cache the value with \\`\"use cache\"\\`\\n - Render the value on the client with \\`\"use client\"\\`\\n%s\\nLearn more: %s",
"1260": "Route \"%s\": Next.js encountered runtime data during prerendering or a navigation.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\nWays to fix this:\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - If params are known, prerender them with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1261": "Route \"%s\": Next.js encountered the unstable value %s while prerendering.\\n\\nThis value can change between renders, so it must be either prerendered or computed later.\\n\\nWays to fix this:\\n - Render at request time by adding a dynamic data access (e.g. \\`await connection()\\`) before this call\\n - Prerender and cache the value with \\`\"use cache\"\\`\\n - Render the value on the client with \\`\"use client\"\\`\\n%s\\nLearn more: %s",
"1262": "Route \"%s\": Next.js encountered uncached or runtime data during prerendering.\\n\\n\\`fetch(...)\\`, \\`cookies()\\`, \\`headers()\\`, \\`params\\`, \\`searchParams\\`, or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\nWays to fix this:\\n - Cache the data access with \\`\"use cache\"\\`\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - If params are known, prerender them with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1263": "Route \"%s\": Next.js encountered runtime data during prerendering.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\nWays to fix this:\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - If params are known, prerender them with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1264": "Route \"%s\": Next.js encountered uncached data during prerendering or a navigation.\\n\\n\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\nWays to fix this:\\n - Cache the data access with \\`\"use cache\"\\`\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1265": "Route \"%s\": Next.js encountered uncached data during prerendering.\\n\\n\\`fetch(...)\\` or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\nWays to fix this:\\n - Cache the data access with \\`\"use cache\"\\`\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1266": "Route \"%s\": Next.js encountered the unstable value %s in a Client Component.\\n\\nThis value would be evaluated during the prerender, instead of recomputed on each visit.\\n\\nWays to fix this:\\n - Wrap the Client Component in \\`<Suspense fallback={...}>\\`\\n - Move the read into a \\`useEffect\\` or event handler\\n%s\\nLearn more: %s",
"1267": "Route \"%s\": Next.js encountered runtime data during prerendering.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\nWays to fix this:\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - Prerender params if known with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1268": "Route \"%s\": Next.js encountered runtime data during prerendering or a navigation.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\nWays to fix this:\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - Prerender params if known with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1269": "Route \"%s\": Next.js encountered uncached or runtime data during prerendering.\\n\\n\\`fetch(...)\\`, \\`cookies()\\`, \\`headers()\\`, \\`params\\`, \\`searchParams\\`, or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\nWays to fix this:\\n - Cache the data access with \\`\"use cache\"\\`\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - Prerender params if known with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1270": "Route \"%s\": Next.js encountered uncached or runtime data during prerendering.\\n\\n\\`fetch(...)\\`, \\`cookies()\\`, \\`headers()\\`, \\`params\\`, \\`searchParams\\`, or \\`connection()\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\nWays to fix this:\\n - Cache the data access with \\`\"use cache\"\\`\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - If the runtime data is \\`params\\` and they're known, prerender them with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1271": "Route \"%s\": Next.js encountered runtime data during prerendering or a navigation.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered or the navigation from being instant, leading to a slower user experience.\\n\\nWays to fix this:\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - If the runtime data is \\`params\\` and they're known, prerender them with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1272": "Route \"%s\": Next.js encountered runtime data during prerendering.\\n\\n\\`cookies()\\`, \\`headers()\\`, \\`params\\`, or \\`searchParams\\` accessed outside of \\`<Suspense>\\` prevents the route from being prerendered, blocking the page load and leading to a slower user experience.\\n\\nWays to fix this:\\n - Provide a placeholder with \\`<Suspense fallback={...}>\\` around the data access\\n - If the runtime data is \\`params\\` and they're known, prerender them with \\`generateStaticParams\\`\\n - Set \\`export const instant = false\\` to allow a blocking route\\n\\nLearn more: https://nextjs.org/docs/messages/blocking-route",
"1273": "\\`experimental.cssChunking: \"graph\"\\` is only supported with Turbopack. Please remove the option or run Next.js with Turbopack in %s.",
"1274": "\\`experimental.cssChunking: \"strict\"\\` is only supported with webpack. Please remove the option or run Next.js with webpack in %s.",
"1275": "\\`experimental.cssChunking: false\\` is only supported with webpack. Please remove the option or run Next.js with webpack in %s."
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const DIALOG_STYLES = `
.error-overlay-dialog-scroll {
overflow-y: auto;
scrollbar-gutter: stable;
height: 100%;
}
`
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type FixCardIcon =
| 'database'
| 'history'
| 'layout'
| 'loading'
| 'octagon'
| 'pointer-click'
| 'server-stack'
Expand All @@ -28,7 +29,7 @@ export const FIX_CARD_GROUPS: Record<
> = {
stream: { label: 'Stream', color: 'blue', icon: 'align-left' },
prerender: { label: 'Prerender', color: 'purple', icon: 'history' },
block: { label: 'Block', color: 'red', icon: 'octagon' },
block: { label: 'Block', color: 'red', icon: 'loading' },
cache: { label: 'Cache', color: 'purple', icon: 'database' },
static: { label: 'Static', color: 'gray', icon: 'zap' },
dynamic: { label: 'Dynamic', color: 'blue', icon: 'server-stack' },
Expand Down Expand Up @@ -77,7 +78,7 @@ const runtimeCards: FixCard[] = [
},
{
id: 'prerender-known-params',
title: 'Prerender known params',
title: 'For known params, prerender',
group: 'cache',
link: 'https://nextjs.org/docs/messages/blocking-route#prerender-known-params',
snippets: [
Expand Down Expand Up @@ -162,7 +163,7 @@ const metadataRuntimeCards: FixCard[] = [
},
{
id: 'render-page-at-request-time',
title: 'Generate the page on every request',
title: 'Mark the route as dynamic',
group: 'dynamic',
link: 'https://nextjs.org/docs/messages/next-prerender-dynamic-metadata#render-page-at-request-time',
snippets: [
Expand All @@ -186,7 +187,7 @@ const metadataDynamicCards: FixCard[] = [
},
{
id: 'render-page-at-request-time',
title: 'Generate the page on every request',
title: 'Mark the route as dynamic',
group: 'dynamic',
link: 'https://nextjs.org/docs/messages/next-prerender-dynamic-metadata#render-page-at-request-time',
snippets: [
Expand All @@ -210,17 +211,6 @@ const viewportRuntimeCards: FixCard[] = [
{ text: '}' },
],
},
{
id: 'wrap-body-in-suspense',
title: 'Wrap body in Suspense',
group: 'stream',
link: 'https://nextjs.org/docs/messages/next-prerender-dynamic-viewport#wrap-body-in-suspense',
snippets: [
{ text: '<Suspense>', highlight: true },
{ text: ' <body>{children}</body>' },
{ text: '</Suspense>', highlight: true },
],
},
{
id: 'allow-blocking-route',
title: 'Allow blocking route',
Expand All @@ -245,17 +235,6 @@ const viewportDynamicCards: FixCard[] = [
{ text: ' return await db.getViewport(…)' },
],
},
{
id: 'wrap-body-in-suspense',
title: 'Wrap body in Suspense',
group: 'stream',
link: 'https://nextjs.org/docs/messages/next-prerender-dynamic-viewport#wrap-body-in-suspense',
snippets: [
{ text: '<Suspense>', highlight: true },
{ text: ' <body>{children}</body>' },
{ text: '</Suspense>', highlight: true },
],
},
{
id: 'allow-blocking-route',
title: 'Allow blocking route',
Expand Down Expand Up @@ -300,8 +279,8 @@ const syncMathCards: FixCard[] = [
link: 'https://nextjs.org/docs/messages/next-prerender-random#render-on-the-client',
snippets: [
{ text: '"use client"', highlight: true },
{ text: 'const [id] = useState(() => Math.random())' },
{ text: 'return <Item id={id} />' },
{ text: '// runs in the browser' },
{ text: 'const id = Math.random()' },
],
},
]
Expand Down Expand Up @@ -336,13 +315,13 @@ const syncDateCards: FixCard[] = [
link: 'https://nextjs.org/docs/messages/next-prerender-current-time#render-on-the-client',
snippets: [
{ text: '"use client"', highlight: true },
{ text: 'useEffect(() => setT(Date.now()), [])' },
{ text: 'return <Banner time={t} />' },
{ text: '// runs in the browser' },
{ text: 'const t = Date.now()' },
],
},
{
id: 'measure-elapsed-time',
title: 'Measure elapsed time',
title: 'For telemetry, use a timing API',
group: 'measure',
link: 'https://nextjs.org/docs/messages/next-prerender-current-time#measure-elapsed-time',
snippets: [
Expand Down Expand Up @@ -383,8 +362,8 @@ const syncCryptoCards: FixCard[] = [
link: 'https://nextjs.org/docs/messages/next-prerender-crypto#render-on-the-client',
snippets: [
{ text: '"use client"', highlight: true },
{ text: 'const [id] = useState(() => crypto.randomUUID())' },
{ text: 'return <Token id={id} />' },
{ text: '// runs in the browser' },
{ text: 'const id = crypto.randomUUID()' },
],
},
]
Expand Down Expand Up @@ -416,7 +395,7 @@ const syncClientDateCards: FixCard[] = [
},
{
id: 'measure-elapsed-time',
title: 'Measure elapsed time',
title: 'For telemetry, use a timing API',
group: 'measure',
link: 'https://nextjs.org/docs/messages/next-prerender-current-time-client#measure-elapsed-time',
snippets: [
Expand Down
Loading
Loading