[PR #841] [CLOSED] feat(app-router): send X-Vinext-Router-Skip on navigation requests [4/6] #890

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

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/841
Author: @NathanDrake2406
Created: 4/14/2026
Status: Closed

Base: mainHead: feat/pr-768-4-skip-header-transport


📝 Commits (4)

  • 4c2f81f feat(app-router): filter skipped layouts from RSC responses and cached reads
  • bc703d5 fix(app-router): address skip-filter review feedback
  • 73d9224 fix(app-router): tighten dormant skip-filter defaults
  • 73f3470 feat(app-router): send X-Vinext-Router-Skip on navigation requests

📊 Changes

11 files changed (+1712 additions, -18 deletions)

View changed files

📝 packages/vinext/src/entries/app-rsc-entry.ts (+9 -0)
📝 packages/vinext/src/server/app-browser-entry.ts (+6 -12)
📝 packages/vinext/src/server/app-elements.ts (+79 -0)
📝 packages/vinext/src/server/app-page-cache.ts (+12 -1)
📝 packages/vinext/src/server/app-page-render.ts (+25 -5)
packages/vinext/src/server/app-page-skip-filter.ts (+340 -0)
📝 tests/__snapshots__/entry-templates.test.ts.snap (+54 -0)
📝 tests/app-elements.test.ts (+145 -0)
📝 tests/app-page-cache.test.ts (+156 -0)
📝 tests/app-page-render.test.ts (+384 -0)
tests/app-page-skip-filter.test.ts (+502 -0)

📄 Description

Summary

PR 4 of 6 — restack of #768. Stacked on #840.

Introduces `buildSkipHeaderValue` and `createRscNavigationRequestHeaders` in `app-elements.ts`. The client-side browser entry now uses the centralized request-header builder for navigation fetches and forwards the current layout flags so subsequent navigations can signal which static layouts the server may omit from the response body.

PR 3's server-side filter remains gated by `supportsFilteredRscStream: false`, so this PR only wires the transport; no behavior change until a later PR flips the gate.

Stack

  1. [1/6] #838 — centralize request-derived page inputs
  2. [2/6] #839 — emit per-layout flags in the RSC payload
  3. [3/6] #840 — filter skipped layouts from RSC responses and cached reads
  4. [4/6] this PR — send X-Vinext-Router-Skip on navigation requests
  5. [5/6] wire build-time layout classification
  6. [6/6] classification reasons sidecar

Test plan

  • `tests/app-elements.test.ts` (35 tests, includes header builder cases)
  • `tests/app-browser-entry.test.ts` (24 tests)

🔄 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/841 **Author:** [@NathanDrake2406](https://github.com/NathanDrake2406) **Created:** 4/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/pr-768-4-skip-header-transport` --- ### 📝 Commits (4) - [`4c2f81f`](https://github.com/cloudflare/vinext/commit/4c2f81fecb5ee5a152f367eca35d7ff6a0699dc2) feat(app-router): filter skipped layouts from RSC responses and cached reads - [`bc703d5`](https://github.com/cloudflare/vinext/commit/bc703d564e81a1451af891fc844b377c6efbe7f9) fix(app-router): address skip-filter review feedback - [`73d9224`](https://github.com/cloudflare/vinext/commit/73d92243c9308c0e6ac26f74149277d6bc7dc4d6) fix(app-router): tighten dormant skip-filter defaults - [`73f3470`](https://github.com/cloudflare/vinext/commit/73f347088861f12dc412a97902ddb6ab4c57bffc) feat(app-router): send X-Vinext-Router-Skip on navigation requests ### 📊 Changes **11 files changed** (+1712 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/entries/app-rsc-entry.ts` (+9 -0) 📝 `packages/vinext/src/server/app-browser-entry.ts` (+6 -12) 📝 `packages/vinext/src/server/app-elements.ts` (+79 -0) 📝 `packages/vinext/src/server/app-page-cache.ts` (+12 -1) 📝 `packages/vinext/src/server/app-page-render.ts` (+25 -5) ➕ `packages/vinext/src/server/app-page-skip-filter.ts` (+340 -0) 📝 `tests/__snapshots__/entry-templates.test.ts.snap` (+54 -0) 📝 `tests/app-elements.test.ts` (+145 -0) 📝 `tests/app-page-cache.test.ts` (+156 -0) 📝 `tests/app-page-render.test.ts` (+384 -0) ➕ `tests/app-page-skip-filter.test.ts` (+502 -0) </details> ### 📄 Description ## Summary **PR 4 of 6 — restack of #768. Stacked on #840.** Introduces \`buildSkipHeaderValue\` and \`createRscNavigationRequestHeaders\` in \`app-elements.ts\`. The client-side browser entry now uses the centralized request-header builder for navigation fetches and forwards the current layout flags so subsequent navigations can signal which static layouts the server may omit from the response body. PR 3's server-side filter remains gated by \`supportsFilteredRscStream: false\`, so this PR only wires the transport; no behavior change until a later PR flips the gate. ## Stack 1. [1/6] #838 — centralize request-derived page inputs 2. [2/6] #839 — emit per-layout flags in the RSC payload 3. [3/6] #840 — filter skipped layouts from RSC responses and cached reads 4. **[4/6] this PR** — send X-Vinext-Router-Skip on navigation requests 5. [5/6] wire build-time layout classification 6. [6/6] classification reasons sidecar ## Test plan - [x] \`tests/app-elements.test.ts\` (35 tests, includes header builder cases) - [x] \`tests/app-browser-entry.test.ts\` (24 tests) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:10:40 +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#890
No description provided.