[PR #634] [MERGED] refactor: extract app page boundary helpers #731

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

📋 Pull Request Information

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

Base: mainHead: codex/app-page-boundary-runtime


📝 Commits (1)

  • d9556ad refactor: extract app page boundary helpers

📊 Changes

5 files changed (+1468 additions, -1277 deletions)

View changed files

📝 packages/vinext/src/entries/app-rsc-entry.ts (+152 -207)
packages/vinext/src/server/app-page-boundary.ts (+189 -0)
📝 tests/__snapshots__/entry-templates.test.ts.snap (+899 -1070)
tests/app-page-boundary.test.ts (+215 -0)
📝 tests/app-router.test.ts (+13 -0)

📄 Description

Summary

  • extract App Router page boundary selection and shared wrap/render branching into app-page-boundary.ts
  • keep app-rsc-entry.ts focused on route-specific metadata and tree wiring while delegating fallback/error boundary response orchestration to typed helpers
  • add focused boundary helper tests and relax the Suspense not-found assertion to check for preserved digests across equivalent React dev payload shapes

Testing

  • vp check packages/vinext/src/server/app-page-boundary.ts packages/vinext/src/entries/app-rsc-entry.ts tests/app-page-boundary.test.ts tests/app-router.test.ts
  • vp test run tests/app-page-boundary.test.ts tests/app-router.test.ts -t 'app page boundary helpers|generated code delegates page boundary rendering'
  • vp test run tests/app-page-boundary.test.ts tests/app-page-request.test.ts tests/app-page-stream.test.ts tests/app-page-execution.test.ts tests/app-page-cache.test.ts tests/app-page-response.test.ts tests/error-boundary.test.ts
  • vp test run tests/entry-templates.test.ts -u
  • vp test run tests/app-router.test.ts -t 'notFound\(\) inside Suspense boundary preserves digest for not-found UI|renders intercepted photo modal on RSC navigation from feed|renders custom not-found.tsx for unmatched routes|notFound\(\) escalates to nearest ancestor not-found.tsx|forbidden\(\) from Server Component returns 403 with forbidden.tsx|unauthorized\(\) from Server Component returns 401 with unauthorized.tsx|renders error boundary wrapper for routes with error.tsx|generated code delegates page boundary rendering to typed helpers|generated code|dynamicParams = false|page ISR \+ searchParams'
  • vp run vinext#build

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/634 **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-page-boundary-runtime` --- ### 📝 Commits (1) - [`d9556ad`](https://github.com/cloudflare/vinext/commit/d9556adc0905c77fbfa15dc9eaa23fffea935e9f) refactor: extract app page boundary helpers ### 📊 Changes **5 files changed** (+1468 additions, -1277 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/entries/app-rsc-entry.ts` (+152 -207) ➕ `packages/vinext/src/server/app-page-boundary.ts` (+189 -0) 📝 `tests/__snapshots__/entry-templates.test.ts.snap` (+899 -1070) ➕ `tests/app-page-boundary.test.ts` (+215 -0) 📝 `tests/app-router.test.ts` (+13 -0) </details> ### 📄 Description ## Summary - extract App Router page boundary selection and shared wrap/render branching into `app-page-boundary.ts` - keep `app-rsc-entry.ts` focused on route-specific metadata and tree wiring while delegating fallback/error boundary response orchestration to typed helpers - add focused boundary helper tests and relax the Suspense not-found assertion to check for preserved digests across equivalent React dev payload shapes ## Testing - `vp check packages/vinext/src/server/app-page-boundary.ts packages/vinext/src/entries/app-rsc-entry.ts tests/app-page-boundary.test.ts tests/app-router.test.ts` - `vp test run tests/app-page-boundary.test.ts tests/app-router.test.ts -t 'app page boundary helpers|generated code delegates page boundary rendering'` - `vp test run tests/app-page-boundary.test.ts tests/app-page-request.test.ts tests/app-page-stream.test.ts tests/app-page-execution.test.ts tests/app-page-cache.test.ts tests/app-page-response.test.ts tests/error-boundary.test.ts` - `vp test run tests/entry-templates.test.ts -u` - `vp test run tests/app-router.test.ts -t 'notFound\(\) inside Suspense boundary preserves digest for not-found UI|renders intercepted photo modal on RSC navigation from feed|renders custom not-found.tsx for unmatched routes|notFound\(\) escalates to nearest ancestor not-found.tsx|forbidden\(\) from Server Component returns 403 with forbidden.tsx|unauthorized\(\) from Server Component returns 401 with unauthorized.tsx|renders error boundary wrapper for routes with error.tsx|generated code delegates page boundary rendering to typed helpers|generated code|dynamicParams = false|page ISR \+ searchParams'` - `vp run vinext#build` 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:51 +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#731
No description provided.