next.js
5c7daf5a - fix(ppr): ensure fallback route params trigger dynamic resume (#81812)

Commit
165 days ago
fix(ppr): ensure fallback route params trigger dynamic resume (#81812) ### What? This PR fixes an issue where pages with fallback route params weren't triggering dynamic resume behavior in PPR (Partial Pre-Rendering). ### Why? When fallback route params exist, the RSC (React Server Components) data is inherently dynamic because the params are encoded into the flight router state. Without this fix, pages with fallback route params would incorrectly be treated as fully static, leading to incorrect behavior. ### How? - Added a check in `app-render.tsx` to ensure that pages with fallback route params (`workStore.fallbackRouteParams.size > 0`) always perform a dynamic resume after the static prerender - Refactored PPR tests to use deterministic sentinel markers (`<\!-- PPR_BOUNDARY_SENTINEL -->`) instead of time-based measurements for more reliable testing - Updated the test utilities to split responses based on the sentinel marker rather than timing delays This ensures that: 1. Pages with fallback route params correctly trigger dynamic behavior 2. PPR tests are more reliable and deterministic 3. The boundary between static and dynamic content is clearly marked in test mode Fixes #
Author
Parents
Loading