mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #629] [MERGED] fix: skip page RSC ISR caching for dynamic requests #727
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#727
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/629
Author: @southpolesteve
Created: 3/21/2026
Status: ✅ Merged
Merged: 3/21/2026
Merged by: @southpolesteve
Base:
main← Head:codex/app-page-rsc-dynamic-isr📝 Commits (2)
6e97052fix: skip page RSC ISR caching for dynamic requestsf5bc069test: align page ISR assertions with helper extraction📊 Changes
9 files changed (+392 additions, -119 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+19 -15)📝
packages/vinext/src/server/app-page-cache.ts(+52 -0)📝
packages/vinext/src/server/app-page-response.ts(+7 -3)📝
tests/__snapshots__/entry-templates.test.ts.snap(+114 -90)📝
tests/app-page-cache.test.ts(+99 -0)📝
tests/app-page-response.test.ts(+21 -0)📝
tests/app-router.test.ts(+58 -10)📝
tests/e2e/app-router/headers-cookies.spec.ts(+4 -1)➕
tests/fixtures/app-basic/app/isr-dynamic-search/page.tsx(+18 -0)📄 Description
Summary
#617fix on top of the extracted page cache/response helpers instead of patching the old inline blockheaders(),cookies(), andnoStore()searchParamspages plus focused helper tests for the new RSC cache-write pathWritten by Codex.
Credit to @NathanDrake2406 (Nathan Nguyen) for the original bug fix direction and regression coverage in #617; this PR ports that work onto the refactored helper structure.
Details
This keeps the current refactor direction intact:
resolveAppPageRscResponsePolicy()now treats page requests as dynamic when the build phase already signaled dynamic usagescheduleAppPageRscCacheWrite()centralizes the deferred RSC cache write and performs the secondconsumeDynamicUsage()check after stream consumptionapp-rsc-entry.tsdelegates the RSC cache-write path to the typed helper instead of keeping that logic inline in the template stringTest plan
vp check packages/vinext/src/server/app-page-response.ts packages/vinext/src/server/app-page-cache.ts packages/vinext/src/entries/app-rsc-entry.ts tests/app-page-response.test.ts tests/app-page-cache.test.ts tests/app-router.test.ts tests/fixtures/app-basic/app/isr-dynamic-search/page.tsxvp test run tests/app-page-response.test.ts tests/app-page-cache.test.tsvp test run tests/entry-templates.test.ts -uvp test run tests/app-router.test.ts -t 'page ISR \+ searchParams|generated code applies two-phase dynamic checks'vp run vinext#buildSupersedes the old approach in #617.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.