Skip to content

instant: enable navigation validation by default#94312

Merged
aurorascharff merged 4 commits into
canaryfrom
aurorascharff/instant-validation-warning-by-default
Jun 2, 2026
Merged

instant: enable navigation validation by default#94312
aurorascharff merged 4 commits into
canaryfrom
aurorascharff/instant-validation-warning-by-default

Conversation

@aurorascharff
Copy link
Copy Markdown
Contributor

@aurorascharff aurorascharff commented Jun 1, 2026

What?

Flips the default experimental.instantInsights.validationLevel from 'manual-warning' to 'warning' so Cache Components apps get instant-navigation validation across all pages by default.

Why?

'manual-warning' only validates pages that explicitly export unstable_instant, so apps see nothing unless they opt in. 'warning' is what users have been turning on manually to actually see the feature (v0, vercel-site).

Test coverage

  • Unit: instant-config-normalization.test.ts pins the framework default at 'warning'.
  • Integration: new instant-validation-level-default/ fixture (no instantInsights in config) asserts implicit dev validation fires, and that build is unaffected.

Collateral test fixtures

Tests whose intent is unrelated to instant validation (router-autoscroll, owner-stack, hmr-iframe, next-image, server-source-maps, etc.) now hit new redboxes/console warnings because their fixtures incidentally use dynamic data. Each opts out with experimental: { instantInsights: { validationLevel: 'manual-warning' } } in next.config.

Open question

With no 'off' / 'info' tier today, silencing Insights after this change requires setting validationLevel: 'manual-warning'. Is that acceptable? Should we inform of this anywhere?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Tests Passed

Commit: 2c5387c

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 1, 2026

Stats cancelled

Commit: 2c5387c
View workflow run

@aurorascharff aurorascharff requested a review from gnoff June 1, 2026 16:49
@aurorascharff aurorascharff marked this pull request as ready for review June 1, 2026 16:49
Copilot AI review requested due to automatic review settings June 1, 2026 16:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates Next.js’ default configuration for Instant Insights validation so Cache Components apps receive instant-navigation validation warnings across all pages by default (without requiring explicit unstable_instant opt-in).

Changes:

  • Change the default experimental.instantInsights.validationLevel from 'manual-warning' to 'warning'.
  • Update config type/docs comments to reflect the new default and clarify behavior wording.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/next/src/server/config.ts Switches the framework default Instant Insights validation level to 'warning' during config finalization.
packages/next/src/server/config-shared.ts Updates normalized-config comments and JSDoc to document 'warning' as the default and fixes wording.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/next/src/server/config.ts
@aurorascharff aurorascharff marked this pull request as draft June 1, 2026 19:47
@aurorascharff aurorascharff marked this pull request as ready for review June 2, 2026 09:49
@aurorascharff aurorascharff merged commit a0c6a61 into canary Jun 2, 2026
294 of 298 checks passed
@aurorascharff aurorascharff deleted the aurorascharff/instant-validation-warning-by-default branch June 2, 2026 23:26
icyJoseph added a commit that referenced this pull request Jun 3, 2026
Restructures the instant navigation guide and tightens the matching
caching getting-started subsection now that warning is the default
validationLevel (PR #94312):

- Intro shrunk to one guide-map line; build-time mechanic moved into
  "What instant means" with the static shell named explicitly and the
  HTML vs RSC payload distinction made clear
- "What instant means" combines blocks + instant definitions into one
  paragraph, lifts the warm-cache caveat into a Good-to-know, and
  pulls the page-loads-vs-client-navigations details collapsible in
  from "The tools"
- New paragraph naming the App Shell as a per-route fallback alongside
  the runtime prefetching extension
- "The tools > Validate instant navigation" reframed around validation
  running by default and the three-tier override hierarchy (per
  segment, per layout subtree via unstable_disableValidation, app-wide
  via validationLevel)
- "The tools > Test it in CI" trimmed to a single sentence pointing at
  the deeper "Prevent regressions with e2e tests" section
- "Fixing a navigation that blocks" Step 1 collapsed to "See what
  validation catches" (no add-unstable_instant action needed); the
  fixed-route code block in Step 2 drops the now-redundant
  unstable_instant = true export
- Standalone "Validating every page by default" section removed (that
  is the default now)
- "Opting out" section renamed and restructured around the three-tier
  hierarchy with manual-warning opt-in Good-to-know; the
  Suspense-over-body details collapsible removed (separate concern
  about bypassing PPR, not validation opt-out)
- AI workflow relabeled observe-fix-iterate (validation runs without
  an explicit declare step)
- Caching getting-started Instant navigation subsection rewritten to
  lead with the static-shell direct-visit callback, name the
  asymmetry concretely (Suspense covering a direct visit may not be
  part of the render on a client navigation), and end with concrete
  options (wrap in Suspense, cache with use cache, move where the
  access happens) plus a Read pointer to the guide
- Glossary links added on first use of static shell and App Shell
- runtime shell -> runtime prerender stays consistent
- instant.mdx and prefetch.mdx: drop version: draft from frontmatter;
  instant.mdx version history table now names v16.3.0
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.

3 participants