Commit Graph

1980 Commits

Author SHA1 Message Date
JamesbbBriz 34d0a57494 test(app-router): cover data-returning server actions skipping visible commits (#2902)
* test(app-router): cover data-returning server actions skipping visible commits

Data-returning fetch actions with no revalidation must resolve their value
without applying the RSC tree — otherwise the server tree hands forms a
fresh initialState and wipes pending edits (the Payload getFormState loop).
vinext's server omits `root` for these responses (shouldSkipPageRendering in
app-server-action-execution.ts) and the client returns the value directly
without committing, mirroring Next.js:

- https://github.com/vercel/next.js/blob/canary/packages/next/src/server/app-render/action-handler.ts
- https://github.com/vercel/next.js/blob/canary/packages/next/src/client/components/router-reducer/reducers/server-action-reducer.ts

The behavior exists but was uncovered by unit tests and had no e2e
asserting form edits survive the roundtrip. Add both so regressions fail
loudly instead of silently resetting form state.

Unit tests (tests/app-browser-server-action-client.test.ts):
- root omitted + ok returnValue -> resolves data, no commit, no cache clear
- root omitted + failed action -> throws, no commit
- root present + revalidation header -> commits decoded tree with returnValue
- raw full-tree payload -> commits with undefined returnValue

E2e (tests/e2e/app-router/server-actions.spec.ts): a blur-triggered
data-returning action (Payload getFormState shape) keeps the pending input
edit and does not advance the page's server render counter.

* test(app-router): add revalidated void-action case; fix e2e describe placement

Follow-up from adversarial review:
- Move the form-preservation e2e out of the "Server action forwarding loop
  guard" describe into its own "Data-returning server actions" block.
- Add a unit case for revalidated void actions (root present, no
  returnValue): commits the tree with undefined returnValue and the
  staticAndDynamic revalidation kind.

* test(app-router): lock void-action returnValue shape from round-2 review

Round-2 adversarial review findings:
- The revalidated void-action unit case mocked `{ root }` without a
  returnValue, but the server always pairs a re-rendered root with a
  returnValue record — void actions come back as `{ ok: true, data:
  undefined }`, which Flight serializes as `$undefined` and decodes to a
  truthy object. Mock the real shape and assert the real value, plus the
  caller-facing `undefined` resolution.
- Clear all mocks after each unit test so a stray mockResolvedValueOnce
  cannot leak across cases.
- Reword the e2e comment: the server render counter is the discriminator
  for "no tree update"; the input assertion guards the user-visible
  contract only (React can reconcile an uncontrolled input in place).
2026-08-13 09:26:42 +01:00
James Anderson d02806b430 test(compat): classify legacy Edge Runtime suite unsupported (#2878)
* fix(app-router): isolate edge route runtime

* test(app-router): canonicalize runtime manifest paths

* fix(app-router): preserve static images in isolated runtimes

* fix(app-router): preserve transforms in isolated runtimes

* fix(app-router): preserve React canary transforms

* Revert "fix(app-router): preserve React canary transforms"

This reverts commit f34f8e3653.

* Revert "fix(app-router): preserve transforms in isolated runtimes"

This reverts commit ca36776c20.

* Revert "fix(app-router): preserve static images in isolated runtimes"

This reverts commit 14b10c0b49.

* Revert "test(app-router): canonicalize runtime manifest paths"

This reverts commit d9672c11c8.

* Revert "fix(app-router): isolate edge route runtime"

This reverts commit 37be1c1712.

* test(compat): mark legacy edge runtime suite unsupported

* test(compat): assert legacy edge suite exclusion
2026-08-13 09:22:52 +01:00
James Anderson c7d5e7bd48 fix(cache): preserve binary fetch response bodies (#2907) 2026-08-13 09:15:27 +01:00
Norcleeh 80557f7c95 fix(lint): transform filename from linter context to the absolute one for prefer-import-alias rule (#2817) 2026-08-12 15:08:33 +00:00
Norcleeh 0440f5a765 fix(cache): ISR cache should store the framework preload header (#2900)
The post-middleware `Link` header, instead of the framework
preload header, is mistakenly stored into the ISR cache.
2026-08-12 14:59:02 +01:00
James Anderson bdc7703b5e fix(pages): align middleware rewrite navigation (#2891)
* fix(pages): align middleware rewrite navigation

* fix(pages): classify localized route queries

* fix(pages): close middleware review gaps

* fix(router): preserve dynamic params in rewrite queries

* fix(link): preserve app prefetch in hybrid routes
2026-08-12 13:38:45 +01:00
James Anderson 09f6a0d090 fix(build): preserve transitive external versions (#2887)
* fix(build): preserve transitive external versions

* fix(build): cover default transitive externals

* perf(build): filter transitive external resolution

* chore(build): keep resolver helpers private

* fix(build): canonicalize transitive external ids

* fix(build): scope transitive resolution to builds

* fix(build): resolve queried transitive importers
2026-08-12 12:35:18 +01:00
James Anderson bc97bf68eb fix(app-router): preserve valued RSC queries through routing (#2883) 2026-08-11 17:40:07 +01:00
James Anderson f48aeb5848 fix(app-router): bail out static search params rendering (#2882)
* fix(app-router): bail out static search params rendering

* fix(app-router): preserve PPR search params tracking

* test(app-router): allow streamed search params fallback
2026-08-11 14:19:48 +01:00
James Anderson 05f2ac6824 fix(app-router): expose not-found fallback flight payload (#2349)
* fix(app-router): expose not-found fallback flight payload

* fix(app-router): release mirrored fallback flight data

* fix(app-router): clear progressive fallback flight mirrors

* fix(app-router): preserve deferred flight consumers

* test(app-router): avoid parsing script tags with regex

* test(app-router): refresh flight transform options
2026-08-11 14:15:18 +01:00
James Anderson 7363ba9312 fix(config): preserve native TypeScript dynamic imports (#2353)
* fix(config): preserve native TypeScript dynamic imports

* fix(config): retain CJS fallback for native configs

* fix(config): detect native CJS references precisely

* test(config): cover CJS native loader fallback

* fix(config): harden native CJS detection

* fix(config): resolve async configs inside runner
2026-08-11 14:09:31 +01:00
James Anderson e534b533bb fix(ci): enable test instrumentation in deploy shards (#2875) 2026-08-11 13:32:40 +01:00
James Anderson d558d62452 fix(ci): serialize tests sharing Vite optimizer cache (#2874) 2026-08-10 23:43:30 +01:00
James Anderson 8c1804d875 fix(app-router): prefetch root-param segment trees (#2856)
* fix(app-router): prefetch root-param segment trees

* fix(app-router): scope root-param segment prefetches

* fix(app-router): preserve route-tree prefetch freshness

* refactor(app-router): share route-tree prefetch gate
2026-08-10 23:11:19 +01:00
James Anderson c4d645b196 fix(prerender): cache use-cache metadata routes (#2848)
* fix(prerender): expose production build phase

* fix(prerender): load config in production build phase

* fix(prerender): cache use-cache metadata routes

* test(ci): serialize route collision fixture

* fix(prerender): skip uncached metadata seeds
2026-08-10 23:04:04 +01:00
James Anderson b39f499487 fix(cache): vary use cache entries by root params (#2847)
* fix(cache): vary use cache entries by root params

* fix(cache): retain context through cache serialization
2026-08-10 21:59:33 +01:00
James Anderson 4e95e97c5c fix(cache): keep encoded dynamic prefetches learning-only (#2866)
* fix(cache): keep encoded dynamic prefetches learning-only

* fix(cache): refresh expired router prefetches

* fix(cache): preserve static prefetch paths
2026-08-10 18:41:00 +01:00
James Anderson 34be9af659 test: add Vite ecosystem CI setup entry point (#2869) 2026-08-10 16:35:50 +00:00
Matt Silverlock fa9a9b7414 ci: mandatory - move Bonk to prod account endpoint (#2868) 2026-08-10 17:11:30 +01:00
James Anderson acc2b202a2 fix(prerender): expose the production build phase (#2846)
* fix(prerender): expose production build phase

* fix(prerender): load config in production build phase
2026-08-10 16:50:17 +01:00
James Anderson 056cd026b3 fix(app-router): preserve full prefetch stale windows (#2851)
* fix(app-router): preserve full prefetch stale windows

* fix(app-router): retain completed dynamic prefetch bounds
2026-08-10 11:21:29 +01:00
James Anderson 99623542d9 test(use-cache): avoid bound capture ordering assumption (#2845) 2026-08-10 01:07:03 +01:00
James Anderson d84c4beae3 fix(cache): delegate CDN header cleanup to adapters (#2797)
* fix(cache): delegate CDN header cleanup to adapters

* fix(cache): keep provider headers in CDN adapters

* docs(cache): define adapter header ownership

* test(cache): restore adapter lifecycle coverage

* fix(cache): require Cloudflare-owned CDN adapters

* test(cache): configure adapters in Cloudflare builds

* fix(cache): use the existing Cloudflare CDN adapter

* fix(cache): keep the Cloudflare CDN adapter opt-in

* refactor(cache): keep Cloudflare header policy in CDN adapter
2026-08-10 01:03:14 +01:00
James Anderson 373e8264a1 feat(use-cache): support callable cached functions with rsc plugin api (#2156)
* fix(use-cache): support nested cache functions passed as props

* fix(use-cache): use inline registerServerReference instead of broken forward-reference module-level code

The previous approach used `noExport: true` and appended module-level
`const ${name}_$$vcf` declarations at the end of the transformed file,
then referenced them via forward reference at the call-site. This caused
a temporal dead zone (TDZ) error because `const` bindings are not
hoisted — the call-site assignment evaluated before the TLA const was
initialized, crashing all RSC files that contain function-level "use
cache" (HTTP 500 for use-cache pages, route handlers, etc.).

Fix: keep the existing hoisting/export behaviour (`noExport` stays
false) and instead wrap `registerCachedFunction(...)` with
`registerServerReference(...)` inline at call-site in the RSC
environment. This adds the RSC serialisation metadata ($$typeof, $$id)
so cached functions can be passed as props to client components
(useActionState / formAction), while not disturbing the existing
exported binding that loadServerAction relies on.

* fix(use-cache): use correct normalised id and register in manifest for nested function props

The previous approach passed the raw absolute file path as the $$id to
registerServerReference. @vitejs/plugin-rsc resolves server references by a
normalised key (sha256(toRelativeId) in build; URL-path in dev), so production
would throw "server reference not found" for any cached function passed as a
client-component prop.

Also, the module was never added to the virtual:vite-rsc/server-references
manifest because only the plugin's own "use server" transform writes to
manager.serverReferenceMetaMap. Without a manifest entry, the production
serverReferences lookup has no entry for the module at all.

Fix:
- Capture the plugin-rsc manager via the rsc:minimal plugin API in
  configResolved so we can write to serverReferenceMetaMap directly.
- Compute normalizedRefKey to match vitePluginUseServer's getNormalizedId():
    build → sha256(toRelativeId(id)).hex.slice(0,12)
    dev   → id.slice(root.length)  (Vite URL path)
- After transformHoistInlineDirective succeeds, register the hoisted export
  names in manager.serverReferenceMetaMap[id] so the manifest is populated.
- Pass normalizedRefKey (not raw id) to registerServerReference.

Add unit tests verifying the hash formula matches plugin-rsc's own logic.

* fix(use-cache): wrap hoisted exports as cached server references and register manifest after rsc:use-server

- Derive the build-mode reference key via plugin-rsc's own
  manager.toRelativeId() instead of a string slice, so the hash input is
  byte-for-byte identical to the plugin's hashString(toRelativeId(id)).
- Reassign each hoisted inline 'use cache' export at module level to
  registerServerReference(registerCachedFunction(fn)) so the module
  export itself is the cached wrapper (Next.js parity: direct action
  invocation goes through the cache) and call sites/manifest imports all
  observe the same wrapped function.
- Register serverReferenceMetaMap entries from a new
  vinext:use-cache-server-references plugin placed after the plugin-rsc
  plugins: rsc:use-server deletes metaMap entries for modules without
  'use server', which wiped the entries written during the use-cache
  transform (prod actions 404'd with 'server reference not found').
- Deduplicate the RSC/non-RSC transform branches into a single
  transformHoistInlineDirective call and hoist the
  @vitejs/plugin-rsc/react/rsc resolution out of the per-module path.
- Replace the self-referential key-formula unit test with the ported
  Next.js fixture (use-cache-with-server-function-props/nested-cache), a
  dev-mode Playwright round-trip test, and a production-server
  integration test that resolves the serialized references via action
  POSTs and asserts cached-invoke semantics.

* docs(use-cache): document dev-key normalisation scope for inline cache server references

* fix(use-cache): throw instead of emitting unresolvable inline cache server references when the plugin-rsc manager is missing

When the @vitejs/plugin-rsc manager is unavailable in the rsc environment,
the inline 'use cache' transform previously fell back to a locally computed
reference key and still wrapped the hoisted exports — but the manifest
registration plugin bails without the manager, so the emitted reference
would serialize into the RSC payload yet never resolve (silent 404 on
action POST in production). Fail loudly at transform time instead; the
manager is a structural invariant whenever the rsc environment exists.

Adds transform-level unit tests for the fail-loud path (build + dev), the
non-rsc no-manager control, and build reference-key parity with plugin-rsc.

* test(use-cache): pin unencrypted closure-captured bound args and document the divergence

Extends the nested-fn-props fixture with a cached function that closes over
a value from the cached component's scope, exercising the .bind(null, ...)
bound-arg path end to end: the production round-trip test asserts the
captured value appears in plaintext in the flight payload (pinning the
documented divergence from Next.js, which encrypts bound args by default)
and that invoking the bound reference observes the captured value; the
Playwright test covers the real flight-client encodeReply round-trip in
dev. A transform-level test pins that captures are emitted as plain bind
args. The divergence is now also documented in the README's Known
limitations section.

* refactor(use-cache): route registerServerReference through a vinext shim to decouple from plugin-rsc module-id normalisation

The inline 'use cache' prepend imported registerServerReference from a
file:// URL of @vitejs/plugin-rsc/react/rsc while the cache runtime
imports the same package via the bare specifier, relying on Vite
normalising both to a single module id. Re-export it instead from a new
vinext-owned cache-server-reference shim whose only react/rsc specifier
is the same bare one cache-runtime uses, resolved from the same importer
location — one module instance by construction. The transform unit test
now pins that the emitted import targets the shim and never a plugin-rsc
file URL.

* test(use-cache): pin cached-invoke semantics for the closure-bound getMessage path

Mirror the getDate cache assertion on the closure-bound path: the
fixture's getMessage now appends a Math.random() suffix so cache hits
are observable, and the production-server round-trip asserts that two
identical bound-arg invocations return the same cached value while a
different bound arg misses instead of reusing the entry. The Playwright
assertion matches the suffixed message via regex.

* fix(use-cache): encrypt closure-bound arguments

* refactor(use-cache): use plugin-rsc directive transforms

* test(use-cache): cover directive transforms across environments

* fix(cache): update RSC directive prerelease

* fix(cache): stabilize directive reference tests

* style(cache): format HMR test

* refactor(use-cache): move server function directives to user land

* refactor(use-cache): clarify generic directive plugin naming

* refactor(use-cache): own directive plugin types

* refactor(use-cache): use plugin-rsc metadata map directly

* refactor(use-cache): own server reference metadata lifecycle

* chore(use-cache): keep directive type internal

* refactor(use-cache): adopt server reference claims

* fix(init): install required plugin-rsc prerelease

* feat(rsc): harden use cache server functions

* feat(cache): adopt plugin-rsc transform primitives

* refactor(cache): rename callable plugin

* test(init): update plugin-rsc install expectations

* test(cache): avoid reloading during HMR retries

* test(cache): align callable references with plugin-rsc

* fix(cache): align mixed directives with plugin-rsc 0.5.34

* fix(cache): harden callable use cache transforms

* fix(cache): support manually configured RSC

* fix(cache): harden manual RSC ordering
2026-08-10 00:52:19 +01:00
github-actions[bot] 07cf9e5c58 chore: version packages (beta) (#2726)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@vinext/cloudflare@1.0.0-beta.5 create-vinext-app@1.0.0-beta.2 vinext@1.0.0-beta.5
2026-08-07 23:15:07 +01:00
James Anderson 25a33cefe9 fix(test): lock hybrid i18n fixture workspace (#2838) 2026-08-07 21:25:47 +00:00
James Anderson b50bace7dd fix(test): name hybrid i18n fixture package (#2837) 2026-08-07 21:21:28 +00:00
Norcleeh a01075ad42 fix(build): throw error if there is _next folder inside the public folder (#2814)
* fix(build): throw error if there is `_next` folder inside the public folder

The `_next` folder under the public folder conflicts
with the internal `_next` route, which is not expected

* fix(build): harden public asset conflict validation

---------

Co-authored-by: James <james@eli.cx>
2026-08-07 21:54:55 +01:00
dependabot[bot] 6f656ffc3b chore(deps): bump voidzero-dev/setup-vp from 1.16.1 to 1.17.0 (#2836)
Bumps [voidzero-dev/setup-vp](https://github.com/voidzero-dev/setup-vp) from 1.16.1 to 1.17.0.
- [Release notes](https://github.com/voidzero-dev/setup-vp/releases)
- [Commits](https://github.com/voidzero-dev/setup-vp/compare/143f5f385f39b1b753ffed1a01ad443811855c8b...313600b80b104eadebb9111787d37a2e83e014ca)

---
updated-dependencies:
- dependency-name: voidzero-dev/setup-vp
  dependency-version: 1.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-07 20:38:40 +01:00
James Anderson 884259a898 fix(dev): adopt initial Pages stylesheets in Vite (#2825)
* fix(dev): adopt initial Pages stylesheets in Vite

* fix(dev): deduplicate fallback Pages stylesheets

* fix(dev): serve virtual Pages stylesheets
2026-08-07 11:49:12 +01:00
James Anderson 0bc39ef5bd fix(pages): apply fallback rewrites after API misses (#2827)
* fix(pages): apply fallback rewrites after API misses

* fix(pages): distinguish API normalization from rewrites
2026-08-07 11:33:24 +01:00
James Anderson 4210d1bcfd fix(css): resolve Sass tsconfig path aliases (#2824) 2026-08-07 11:11:47 +01:00
James Anderson 843d3ed921 test: add Vite ecosystem CI entry points (#2833) 2026-08-07 10:12:19 +01:00
Donny/강동윤 86620d5917 feat(client): expose host React to Module Federation remotes (#2828)
* fix(client): bridge React for Module Federation

* fix(ci): register generated React bootstrap entry

---------

Co-authored-by: James <james@eli.cx>
2026-08-06 14:43:11 +00:00
dependabot[bot] 3c5cea4f25 chore(deps): bump voidzero-dev/setup-vp from 1.15.0 to 1.16.1 (#2816)
Bumps [voidzero-dev/setup-vp](https://github.com/voidzero-dev/setup-vp) from 1.15.0 to 1.16.1.
- [Release notes](https://github.com/voidzero-dev/setup-vp/releases)
- [Commits](https://github.com/voidzero-dev/setup-vp/compare/250f29ce396baf5e8f24498e17c0dfdebabc26eb...143f5f385f39b1b753ffed1a01ad443811855c8b)

---
updated-dependencies:
- dependency-name: voidzero-dev/setup-vp
  dependency-version: 1.16.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 21:53:19 +01:00
James Anderson 255be4e2ab fix(middleware): align encoded path matching (#2802)
* fix(middleware): align encoded path matching

* test(pages): separate matcher and route identity

* fix(middleware): preserve delimiter matcher parity

* fix(middleware): preserve trailing source delimiters

* test(middleware): align trailing source expectations

* fix(middleware): align trailing slash matcher normalization
2026-08-04 15:20:08 +01:00
James Anderson dfc979cc42 fix(app-router): hand off zero-stale prefetches (#2801) 2026-08-03 22:34:21 +01:00
dependabot[bot] 4f7d3fc3f9 chore(deps): bump zizmorcore/zizmor-action from 0.6.0 to 0.6.2 (#2800)
Bumps [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) from 0.6.0 to 0.6.2.
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](https://github.com/zizmorcore/zizmor-action/compare/6599ee8b7a49aef6a770f63d261d214911a7ce02...3dc1ecc9bcb9e94e9b2c709687979e1298497054)

---
updated-dependencies:
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-03 20:42:51 +01:00
James Anderson cf689f2e43 fix(pages): run middleware before image endpoint (#2776)
* fix(pages): run middleware before image endpoint

* fix(pages): preserve image rewrite query
2026-08-03 18:33:41 +00:00
James Anderson 2d08de067d fix(pages): preserve raw data URLs for middleware (#2775)
* fix(pages): preserve raw data URLs for middleware

* fix(pages): preserve data route path with skipped normalization
2026-08-03 18:26:09 +00:00
James Anderson 97aea8fc07 fix(ci): pin Next.js tracker OpenCode version (#2799)
* fix(ci): pin Next.js tracker OpenCode version

* fix(ci): align tracker model with Big Bonk
2026-08-03 16:46:19 +00:00
James Anderson 3deb467b21 fix(pages): preserve gSSP headers on redirects (#2771)
* fix(pages): preserve gSSP headers on redirects

* test(pages): cover data redirect headers
2026-08-03 15:43:57 +00:00
James Anderson 81c0b03ef2 fix(pages): preserve not-found response headers (#2773)
* fix(pages): preserve not-found response headers

* fix(pages): preserve not-found headers in dev
2026-08-03 15:59:22 +01:00
James Anderson f9278afafe fix(pages): support bodyless API responses (#2772) 2026-08-03 15:32:50 +01:00
James Anderson 948a14a7e6 fix(examples): declare complex purge secret (#2774) 2026-08-03 15:23:57 +01:00
James Anderson ce90ea286a fix(app-router): pass rewrite validation to source middleware (#2798) 2026-08-03 14:08:17 +00:00
Nathan Nguyen 4108dab89c fix(fetch-cache): honor RequestInit in request dedupe (#2762)
* fix(fetch-cache): honor RequestInit in request dedupe

Request inputs with per-call overrides were deduped using the base Request even though fetch executes the overridden headers and options. Distinct authenticated requests could therefore share one response and persist it under the wrong cache key.

Normalize the effective GET or HEAD request before deriving the dedupe key so request-scoped reuse and persistent cache storage stay partitioned by the options the network sees.

* fix(fetch-cache): preserve effective request semantics

* fix(fetch-cache): key inherited request options

* fix(fetch-cache): serialize bodies with effective headers

* fix(fetch-cache): normalize default request options

* fix(fetch-cache): key normalized request body metadata

* fix(fetch-cache): distinguish normalized body variants

* fix(fetch-cache): hash body bytes without loss

* fix(fetch-cache): bound body key fallback work

* test(fetch-cache): lock effective auth bypass

---------

Co-authored-by: James <james@eli.cx>
2026-08-03 15:07:04 +01:00
Nathan Nguyen 7d786e0350 fix(app-router): keep server metadata out of RSC payloads (#2769)
The App Router payload previously serialized partial render observations and slash-prefixed source page paths into document HTML. Server-only cache tags could leak into the client bootstrap, while crawlers could interpret source page metadata as URLs.\n\nKeep complete render observations at cache finalization, transport source pages as validated segments, and retain legacy source strings only for reading cached payloads during rolling deployments. Next-compatible browser source-page diagnostics remain reconstructible from the segment form.\n\nAdd codec, renderer, fallback, and production HTML regression coverage for the wire contract and the absence of server metadata from documents.

Co-authored-by: James <james@eli.cx>
2026-08-03 14:45:02 +01:00
Nathan Nguyen 7bcbe94a25 fix(script): reject event attributes in hoisted HTML (#2763)
App Router hoisting manually serializes beforeInteractive Script props, bypassing React DOM filtering for string-valued event handlers. Request-influenced on* props could therefore become executable inline attributes in the server response.\n\nReject event-handler names case-insensitively at the raw HTML emission boundary while preserving legitimate attributes such as data-onload. The regression test exercises the actual Script capture and hoisted render path.

Co-authored-by: James <james@eli.cx>
2026-08-03 14:26:42 +01:00
Nathan Nguyen 87220d0bc2 test(app-router): cover consumed prefetch cache handoff (#2758)
* fix(app-router): preserve consumed prefetch during cache handoff

Keep the buffered snapshot discoverable while navigation publishes the committed visited response. This prevents a remounted prefetch-enabled Link from observing a false cache miss and starting a duplicate RSC request.

* test(app-router): verify prefetch handoff delay

* test(app-router): latch prefetch handoff delay

* test(app-router): hold cache latch through remount

---------

Co-authored-by: James <james@eli.cx>
2026-08-03 14:26:18 +01:00