-
Notifications
You must be signed in to change notification settings - Fork 296
feat: flat keyed payload for App Router layout persistence #750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
NathanDrake2406
wants to merge
28
commits into
cloudflare:main
Choose a base branch
from
NathanDrake2406:feat/layout-persistence-pr-2c
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
7f4f8eb
Extract app page route wiring helpers
NathanDrake2406 5d8525b
Add slot client primitives
NathanDrake2406 be33773
Fix app page error boundary serialization
NathanDrake2406 ca40d05
Fix client error boundary pathname reset
NathanDrake2406 bddda39
Document Next.js error boundary verification
NathanDrake2406 38d33ca
Merge local PR 2a into PR 2c base
NathanDrake2406 8c22db3
Merge local PR 2b into PR 2c base
NathanDrake2406 d488978
Implement flat App Router payload for layout persistence
NathanDrake2406 ec008fa
fix: address review findings in flat payload implementation
NathanDrake2406 5395efc
fix: normalize flat payload after use(), not before
NathanDrake2406 955f577
fix: produce flat RSC payload on all rendering paths
NathanDrake2406 ce76239
test: update unit tests for flat RSC payload on all paths
NathanDrake2406 c7a03d5
fix: wrap Flight thenable in Promise.resolve() before chaining .then()
NathanDrake2406 7fead69
fix: eliminate Promise from ElementsContext to fix React 19 hydration
NathanDrake2406 311b10a
test: update slot and browser state tests for resolved ElementsContext
NathanDrake2406 2b5f68c
ci: retrigger
NathanDrake2406 7554b20
fix: address code review findings (P1-P3)
NathanDrake2406 1014aed
fix: avoid serializing app render dependency wrappers
NathanDrake2406 5e516bd
Fix flat payload dependency barriers
NathanDrake2406 ee2fbdd
Fix template-only route wrappers
NathanDrake2406 f8e2276
chore: trigger CI review
NathanDrake2406 c346485
fix: skip Slot wrapping for layout entries without a default export
NathanDrake2406 d2a4d13
Merge upstream/main into feat/layout-persistence-pr-2c
NathanDrake2406 9b9a6d5
fix: restore merged app router entry behavior
NathanDrake2406 f4949b4
fix: address app router review regressions
NathanDrake2406 c606e62
Merge upstream/main into feat/layout-persistence-pr-2c
NathanDrake2406 a220f3d
Fix app-page-request intercept tests
NathanDrake2406 9959097
Address PR 2c review follow-ups
NathanDrake2406 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regression: middleware can clobber framework redirect headers.
The old code intentionally set
x-action-redirect*headers after__mergeMiddlewareResponseHeaderswith an explicit comment:The new code sets these headers in the
Headersconstructor before the merge call. SincemergeMiddlewareResponseHeadersusestarget.set(key, value)for non-cookie/non-vary headers (app-page-response.ts:183), if middleware setsx-action-redirect,x-action-redirect-type, orx-action-redirect-status, those values will overwrite the framework's authoritative values.This is a security-relevant regression — middleware could redirect server action responses to an unintended URL.
Note: this pattern appears in the generated code for all route variants (the same regression is repeated in each snapshot branch of the entry template).