next.js
cdedbc0d - Use `ResponseCompleteness` enum for segment cache write paths

Commit
10 days ago
Use `ResponseCompleteness` enum for segment cache write paths Replace the `isResponsePartial` boolean in `writeDynamicRenderResponseIntoCache` and `writeSeedDataIntoCache` with a three-state `ResponseCompleteness` enum that distinguishes: - `Partial`: segments have dynamic holes (static stage responses, PPRRuntime prefetches with `~` marker, postponed responses) - `Complete`: all segments are complete, but the head may still be partial per the server's flag (Full/LoadingBoundary prefetches) - `FullyStatic`: server explicitly marked the response as fully static (marker byte `#`) — both segments and head are complete The boolean conflated two independent concerns: segment partiality and whether the server's `isHeadPartial` flag can be overridden. This caused Full prefetches (which are complete but may have partial heads) to incorrectly override `isHeadPartial` to `false`, breaking loading boundary display for pages with dynamic metadata.
Author
Committer
Parents
Loading