mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #763] [MERGED] fix: pass thenable params and searchParams to probePage() #827
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#827
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/763
Author: @NathanDrake2406
Created: 4/3/2026
Status: ✅ Merged
Merged: 4/3/2026
Merged by: @james-elicx
Base:
main← Head:fix/probe-page-thenable-params📝 Commits (1)
4816ecefix: pass thenable params and searchParams to probePage()📊 Changes
6 files changed (+328 additions, -7 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+14 -1)📝
tests/__snapshots__/entry-templates.test.ts.snap(+84 -6)📝
tests/app-page-probe.test.ts(+147 -0)📝
tests/app-router.test.ts(+39 -0)➕
tests/fixtures/app-basic/app/probe-async-params/[id]/page.tsx(+23 -0)➕
tests/fixtures/app-basic/app/probe-async-search/page.tsx(+21 -0)📄 Description
Summary
probePage()passed raw null-prototype params instead of thenable params, causing TypeError for pages usingawait params(Next.js 15+ pattern)searchParams, causing pages usingawait searchParamsto failnotFound()/redirect()detection)The fix computes
_asyncSearchParams(URLSearchParams converted to a plain object then wrapped inmakeThenableParams()) alongside_asyncLayoutParams, and passes both to theprobePage()callback — matching the same prop shape thatbuildPageElement()gives to the real render.Test plan
notFound()from an async-params page when params are thenableredirect()from an async-searchParams page when searchParams are thenableawait paramsthennotFound()returns 404await searchParamsthenredirect()returns 307tests/features.test.ts— all 264 tests pass🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.