mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 00:09:23 +02:00
[PR #778] [MERGED] fix: await buildPageElement in server action re-render path #838
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#838
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/778
Author: @NathanDrake2406
Created: 4/4/2026
Status: ✅ Merged
Merged: 4/4/2026
Merged by: @james-elicx
Base:
main← Head:fix/await-build-page-element-action📝 Commits (1)
8cae9b0fix: await buildPageElement in server action re-render path📊 Changes
3 files changed (+24 additions, -7 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+1 -1)📝
tests/__snapshots__/entry-templates.test.ts.snap(+6 -6)📝
tests/entry-templates.test.ts(+17 -0)📄 Description
Summary
app-rsc-entry.tswas callingbuildPageElement()withoutawait, assigning a Promise toelementinstead of a resolved React elementredirect()/notFound()thrown insidegenerateMetadata()during action re-renders to surface as RSC stream errors rather than propagating to the outer catch handlergetAndClearPendingCookies()to run before page tree construction resolved, missing any cookies set during page buildingThe fix is a single
awaiton line 1746, aligning the action re-render path with the normal render path which already correctly awaitsbuildPageElement.Test plan
tests/entry-templates.test.tsthat asserts the generated entry code containselement = await buildPageElement(...)in the action re-render path — verified it fails before the fix and passes afterawaitin the generated codepnpm test tests/entry-templates.test.ts— 21/21 tests passvp checkon changed files — no formatting, lint, or type errors🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.