feat(app-router): send X-Vinext-Router-Skip on navigation requests [4/6]#841
Closed
NathanDrake2406 wants to merge 4 commits intocloudflare:mainfrom
Closed
feat(app-router): send X-Vinext-Router-Skip on navigation requests [4/6]#841NathanDrake2406 wants to merge 4 commits intocloudflare:mainfrom
NathanDrake2406 wants to merge 4 commits intocloudflare:mainfrom
Conversation
6 tasks
commit: |
6 tasks
3f9be3b to
939d4b7
Compare
…d reads Introduce app-page-skip-filter.ts with the canonical-bytes guarantee: the render path always produces the full RSC payload and writes it to the cache; the egress branch applies a byte-level filter that omits layouts the client asked to skip, but only if the server independently classified them as static (computeSkipDecision). Wire the filter into renderAppPageLifecycle and buildAppPageCachedResponse so both fresh renders and cache hits honor the skip header. Parse the incoming X-Vinext-Router-Skip header at the handler scope and thread the resulting set through render and ISR. Gate the filter behind supportsFilteredRscStream: false in the generated entry so this PR is dormant at runtime until the canonical-stream story is validated. Tests exercise the filter directly by injecting the skip set into renderAppPageLifecycle options.
Introduce buildSkipHeaderValue and createRscNavigationRequestHeaders in app-elements. 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.
939d4b7 to
73f3470
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Test plan