Commit Graph

5 Commits

Author SHA1 Message Date
Nathan Nguyen d1a80cd668 fix(app-router): preserve front redirects through fallback route handlers (#2000)
* fix(app-router): preserve front redirects through fallback route handlers

* test(e2e): assert single bootstrap hydration in front-redirect test

* chore: remove dead stripDeploymentIdQuery export

* fix(app-router): handle cancelled bootstrap streams

* docs(app-router): clarify bootstrap recovery

* test(e2e): tolerate dangling fixture symlink

* test(e2e): run front redirect regression in CI

* fix(app-router): always hide internal RSC queries

* fix(app-router): preserve visible hydration URL

* test(e2e): scope visible URL regression

* refactor(app-router): trim front redirect residue

* test(e2e): group fixture setup command

* test(e2e): tighten front redirect assertions

* fix(app-router): preserve ordinary route handler URLs

* fix(app-router): normalize edge route handler URLs

* docs(app-router): explain route URL parity

* fix(app-router): preserve Node RSC request URLs

* fix(app-router): normalize route handler RSC paths

* fix(app-router): forward RSC tokens through rewrites

---------

Co-authored-by: James <james@eli.cx>
2026-06-13 22:08:02 +01:00
Nathan Nguyen 0d8d3e3c60 refactor(router): quarantine navigation runtime topology (#1322)
* refactor(router): quarantine navigation runtime topology

* fix(router): restore manifest-backed interception runtime

App Router browser navigations lost first-hop intercepted route context after snapshot topology stopped acting as fallback proof. That made /feed to /photos/:id request the direct page payload instead of the declared modal payload.

The violated invariant was that route topology must come from the manifest, while snapshots only carry runtime proof. Resolve first-hop interception from the manifest, move RSC bootstrap streams onto the symbol-backed runtime, teach prerender extraction that script shape, and harden the runtime contract around route manifest and RSC data.

Coverage includes runtime seam tests, prerender extraction tests, planner/browser navigation tests, package rebuild, and the app-router intercepted routes E2E slice.

* fix(router): narrow prerender RSC script parsing

The prerender extractor accepted any script starting with the symbol-runtime bootstrap expression, then parsed it as though it had the exact RSC chunk-push prefix. That was harmless at the current head, but it made future runtime scripts a foot-gun.

Only the exact runtime chunk prefix and exact done marker are now accepted. A focused extractor test covers non-chunk runtime scripts that share the bootstrap expression prefix.

* fix(router): address navigation runtime review

* fix(router): resolve navigation runtime review threads
2026-05-20 10:29:13 +01:00
Nathan Nguyen 5d622369dc fix(rsc): preserve binary inlined Flight chunks (#1245)
Inlined App Router Flight data could only travel through string chunks. That corrupted arbitrary binary RSC chunks during SSR hydration and static prerender extraction because non-UTF-8 bytes were decoded to replacement characters before React read them.

Encode non-UTF-8 embedded chunks as base64 binary records, decode those records back to bytes in the browser, and write prerendered .rsc payloads as bytes instead of UTF-8 text.

Regression coverage exercises server embedding, browser reconstruction, and prerender extraction for binary RSC chunks.
2026-05-16 17:21:10 +01:00
Nathan Nguyen 08da5c32e9 fix(app-router): error truncated progressive RSC streams (#1176) 2026-05-12 13:53:04 +01:00
Steve Faulkner a6d2c3a09c Refactor App Router virtual entries into typed runtime modules (#616)
* refactor: move app router SSR/browser runtime into typed modules

* style: format typed app runtime modules

* refactor: address runtime entry review follow-ups
2026-03-20 23:03:27 -05:00