[PR #624] [MERGED] refactor: extract app route handler execution helpers #723

Closed
opened 2026-05-06 13:09:48 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/624
Author: @southpolesteve
Created: 3/21/2026
Status: Merged
Merged: 3/21/2026
Merged by: @southpolesteve

Base: mainHead: codex/app-route-handler-request-execution


📝 Commits (1)

  • 09f3378 refactor: extract app route handler execution helpers

📊 Changes

5 files changed (+830 additions, -892 deletions)

View changed files

📝 packages/vinext/src/entries/app-rsc-entry.ts (+46 -127)
packages/vinext/src/server/app-route-handler-execution.ts (+221 -0)
📝 tests/__snapshots__/entry-templates.test.ts.snap (+258 -762)
tests/app-route-handler-execution.test.ts (+300 -0)
📝 tests/app-router.test.ts (+5 -3)

📄 Description

Summary

  • extract the live App Router route-handler execution path into a typed app-route-handler-execution.ts runtime module
  • reuse that helper for background route-handler regeneration so less request lifecycle logic stays embedded in app-rsc-entry.ts
  • add focused execution-helper unit coverage and update generator assertions/snapshots to match the helper-based shape

Verification

  • vp check packages/vinext/src/server/app-route-handler-execution.ts packages/vinext/src/entries/app-rsc-entry.ts tests/app-route-handler-execution.test.ts tests/app-router.test.ts tests/__snapshots__/entry-templates.test.ts.snap
  • vp test run tests/app-route-handler-execution.test.ts tests/app-route-handler-runtime.test.ts tests/app-route-handler-response.test.ts tests/app-route-handler-policy.test.ts
  • vp test run tests/entry-templates.test.ts
  • vp test run tests/app-router.test.ts -t 'route handler'
  • vp test run tests/nextjs-compat/app-routes.test.ts
  • vp run vinext#build

Stacked on #622.

Written by Codex.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/624 **Author:** [@southpolesteve](https://github.com/southpolesteve) **Created:** 3/21/2026 **Status:** ✅ Merged **Merged:** 3/21/2026 **Merged by:** [@southpolesteve](https://github.com/southpolesteve) **Base:** `main` ← **Head:** `codex/app-route-handler-request-execution` --- ### 📝 Commits (1) - [`09f3378`](https://github.com/cloudflare/vinext/commit/09f337839771afa244ef3061fb4128320eafab80) refactor: extract app route handler execution helpers ### 📊 Changes **5 files changed** (+830 additions, -892 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/entries/app-rsc-entry.ts` (+46 -127) ➕ `packages/vinext/src/server/app-route-handler-execution.ts` (+221 -0) 📝 `tests/__snapshots__/entry-templates.test.ts.snap` (+258 -762) ➕ `tests/app-route-handler-execution.test.ts` (+300 -0) 📝 `tests/app-router.test.ts` (+5 -3) </details> ### 📄 Description ## Summary - extract the live App Router route-handler execution path into a typed `app-route-handler-execution.ts` runtime module - reuse that helper for background route-handler regeneration so less request lifecycle logic stays embedded in `app-rsc-entry.ts` - add focused execution-helper unit coverage and update generator assertions/snapshots to match the helper-based shape ## Verification - `vp check packages/vinext/src/server/app-route-handler-execution.ts packages/vinext/src/entries/app-rsc-entry.ts tests/app-route-handler-execution.test.ts tests/app-router.test.ts tests/__snapshots__/entry-templates.test.ts.snap` - `vp test run tests/app-route-handler-execution.test.ts tests/app-route-handler-runtime.test.ts tests/app-route-handler-response.test.ts tests/app-route-handler-policy.test.ts` - `vp test run tests/entry-templates.test.ts` - `vp test run tests/app-router.test.ts -t 'route handler'` - `vp test run tests/nextjs-compat/app-routes.test.ts` - `vp run vinext#build` Stacked on #622. Written by Codex. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:09:48 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#723
No description provided.