mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #967] [MERGED] refactor: extract server action RSC flow #988
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#988
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/967
Author: @NathanDrake2406
Created: 4/29/2026
Status: ✅ Merged
Merged: 4/29/2026
Merged by: @james-elicx
Base:
main← Head:nathan/extract-server-action-rsc-flow📝 Commits (1)
6e1899arefactor: extract server action rsc flow📊 Changes
6 files changed (+1276 additions, -1617 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+84 -221)📝
packages/vinext/src/server/app-server-action-execution.ts(+353 -2)📝
tests/__snapshots__/entry-templates.test.ts.snap(+504 -1326)📝
tests/app-router.test.ts(+43 -54)📝
tests/app-server-action-execution.test.ts(+281 -0)📝
tests/entry-templates.test.ts(+11 -14)📄 Description
Summary
Extract the fetch/RSC server action POST flow out of the generated App Router RSC entry and into
packages/vinext/src/server/app-server-action-execution.ts.The generated entry now describes app shape and route-specific wiring only: action headers, route matching, element construction, request-scoped callbacks, and route table access. The normal server module owns behavior: CSRF checks, body limits, payload validation, action execution phase, redirect control headers, action return packaging, middleware/cookie header merging, and RSC response construction.
Next.js references
handleAction.next-actionheader ingetServerActionRequestMetadata.action-handler.ts.action-handler.ts.action-handler.ts.Tests
vp test run tests/app-server-action-execution.test.ts tests/entry-templates.test.tsvp test run tests/app-router.test.ts -t "server action"vp checkNotes
This is intentionally a refactor of ownership, not a behavior change. Existing generated-entry assertions that locked down inline action implementation were moved to helper-focused behavior tests and generated-entry wiring tests.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.