[pull] canary from vercel:canary#1094
Merged
Merged
Conversation
I'm about to add 2 new parameters to the `StagedRenderingController` constructor in #93801, and having them all be positional a `true` or `null` makes it hard to see what a callsite is actually doing, so i'm switching it to use an args object for readability. Extracted from #93801 to make the diff smaller.
### What? Prevent `hmrRefreshReducer` from being included in production App Router browser chunks and add regression coverage for the production bundle. ### Why? `hmrRefreshReducer` is only used by development HMR, but its eager import from the client reducer caused it to be shipped in optimized production bundles. ### How? Load the HMR reducer behind the compile-time development branch in `ACTION_HMR_REFRESH`, allowing production bundlers to eliminate its module edge. Extend the production `browser-chunks` test to reject `hmr-refresh-reducer` sources. ### Verification - `pnpm --filter=next build` - `pnpm next build test/e2e/app-dir/hello-world` and verified its production client chunks contain no `hmrRefreshReducer` or `hmr-refresh-reducer` - Red check: restored the eager import and confirmed `NEXT_TEST_PREFER_OFFLINE=1 pnpm test-start-turbo test/production/app-dir/browser-chunks/browser-chunks.test.ts` fails on the new assertion - `NEXT_TEST_PREFER_OFFLINE=1 pnpm test-start-turbo test/production/app-dir/browser-chunks/browser-chunks.test.ts` - `NEXT_TEST_PREFER_OFFLINE=1 pnpm test-start-webpack test/production/app-dir/browser-chunks/browser-chunks.test.ts` <!-- NEXT_JS_LLM_PR -->
Remove the `instantNavigationDevToolsToggle` experimental flag and show the Navigation Inspector whenever `cacheComponents` is enabled. Also updates docs and test fixtures that referenced the old flag.
Rework the execution order of rewrites. - before and after Files execution is now clearer - when a source matches and how the destination resolves - explicit `dynamic routes` step (similar to Proxy's, https://nextjs.org/docs/app/api-reference/file-conventions/proxy#execution-order) --------- Co-authored-by: JJ Kasper <jj@jjsweb.site>
Reframes the Draft Mode guide so the headline is "every Next.js cache layer is bypassed for the request," not "switch to dynamic rendering." The previous guide led with an `isEnabled` fork in `getData()`, which implied users have to branch their fetch code to make caching step aside. They don't. Changes: - Intro lists the bypassed layers (`fetch` cache, `'use cache'`, `unstable_cache`, ISR response cache). - Step 3 fetches from a single endpoint with no `isEnabled` branch. - New Step 4 shows a preview banner + disable handler, which is where `isEnabled` is actually useful. - The "Cache Components" example uses `isEnabled` for a UI indicator instead of branching the fetch URL. - Two-URL fork demoted to a final section for CMSs that genuinely need it.
It is possible to call cached functions from the client, under a couple of conditions. Rather than introducing this as a pattern now, let's start with a callout. Similarly (extending) Server Functions, the client only sees a reference, no implementation details leak.
Introduce a private env `__NEXT_DISABLE_DEV_OVERLAY_UX ` to skip loading devtool UX when it's specified
We have no testing infrastructure, unfortunately <img width="2254" height="1260" alt="Bildschirmfoto 2026-05-28 um 20 29 58" src="https://github.com/user-attachments/assets/a9f1b646-994d-4417-98d7-160ce5249032" />
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )