-
Notifications
You must be signed in to change notification settings - Fork 292
refactor: extract route wiring from generated entry into typed runtime module #748
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
Merged
james-elicx
merged 7 commits into
cloudflare:main
from
NathanDrake2406:feat/layout-persistence-pr-2b
Apr 3, 2026
+910
−1,606
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7f4f8eb
Extract app page route wiring helpers
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 f7b35a0
Address bonk review: edge case tests and readability nit
NathanDrake2406 175ae93
Address second-round review: type honesty and test cleanup
NathanDrake2406 98174ca
Add comment explaining template vs layout param asymmetry
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
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
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.
Clean delegation. The options bag makes it very clear what data flows into the wiring logic, and the generated code is now ~15 lines instead of ~200. This is exactly what the "thin entries" guideline calls for.
One thing I noticed: the snapshot at
entry-templates.test.ts.snapline 750 showsglobalErrorModule: nullfor the basic fixture (no global-error.tsx), while this source template correctly interpolates theglobalErrorVar. The snapshot correctly reflects the fixture state — just confirming the template conditional works both ways.