mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 00:09:23 +02:00
[PR #822] fix: always mark pages that receive searchParams as dynamic #872
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#872
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/822
Author: @southpolesteve
Created: 4/11/2026
Status: 🔄 Open
Base:
main← Head:fix/isr-always-mark-dynamic-with-searchparams📝 Commits (1)
57efd1ffix: always mark pages that receive searchParams as dynamic📊 Changes
4 files changed (+99 additions, -63 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+9 -9)📝
tests/__snapshots__/entry-templates.test.ts.snap(+54 -54)📝
tests/app-router.test.ts(+20 -0)➕
tests/fixtures/app-basic/app/search-params-page/page.tsx(+16 -0)📄 Description
Summary
Pages that read
searchParamsare now always marked dynamic, even when the first request has an empty query string.Details
Previously,
markDynamicUsage()was only called when the URL contained query parameters (hasSearchParams). A request to/page(no query) would render withsearchParams = {}, not be marked dynamic, and get ISR-cached. A later request to/page?filter=violetwould then receive the cached empty-query response.The fix removes the
hasSearchParamsguard somarkDynamicUsage()is called unconditionally wheneversearchParamsis provided to the page component. This matches Next.js behavior where accessing thesearchParamsprop signals dynamic rendering regardless of whether the URL has query parameters.Tests
Adds a production integration test with a dedicated fixture page (
/search-params-page) that readssearchParams:filter=none?filter=violet: not cached, rendersfilter=violet🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.