[pull] canary from vercel:canary - #1256
Merged
Merged
Conversation
When a static fallback shell is served as-is — e.g. from a CDN in a deployed environment — the client can't hydrate from inline Flight data; it fetches the full RSC payload separately and reconstructs the initial payload on the client. During that reconstruction, the head's partiality flag was accidentally set to the head itself. Since the head is always truthy, the head was unconditionally treated as partial. This happens to be unobservable today: the only flows that reach the reconstruction are fallback-shell prerenders, where the server pessimistically marks the head partial anyway, and when Cache Components is enabled the client ignores the per-payload flag entirely in favor of response-level partiality. But we're about to rework the RSC response format so that head partiality has a single, load-bearing source of truth, so the flag needs to survive the reconstruction correctly rather than by coincidence. While auditing the payload consumers, I also fixed the payload shape check in segment prefetch generation (it used `&&` where `||` was intended, so it accepted any shape) and deleted `should-hard-navigate.ts`, which no longer has any callers on the client. Adds e2e coverage asserting that metadata survives hydrating a fallback shell page: the title is correct after hydration, the head is included in prefetched data, and a return navigation is served entirely from the cache that was populated during initial hydration. In deployed environments this exercises the client resume path, which is where the reconstruction runs.
Built using @sokra's Fleet! This re-arranges all of our chunking experimental features under `experimental.turbopackChunking` and adds the following options: ```javascript /** * Avoid creating more than one chunk smaller than this size, in bytes. Smaller * chunks are merged into bigger ones to avoid that. Defaults to `50000` (50 KB). */ minChunkSize?: number /** * Avoid creating more than this number of chunks per chunk group. Chunks are * merged into bigger ones to avoid that. Defaults to `40`. */ maxChunkCountPerGroup?: number /** * Never merge chunks bigger than this size, in bytes, with other chunks. This keeps code * in big chunks from being duplicated across multiple chunks. Defaults to `200000` (200 KB). */ maxMergeChunkSize?: number /** * Minimum size, in bytes, for a component chunk to be emitted on its own when * `generateComponentChunks` is enabled. Component chunks smaller than this are folded into a * single remainder chunk. Defaults to `20000` (20 KB). */ minComponentChunkSize?: number ```
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 : )