cloudflare/vinext

App Router: RSC navigations drop `?_rsc=` query param on redirect/rewrite

クローズ

#1,529 opened on 2026/05/22

 (2 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (383 件のフォーク)github user discovery
adapter-api-e2ehelp wanted

Repository metrics

Stars
 (8,624 個のスター)
PR merge metrics
 (平均マージ 1d 1h) (30d で 462 merged PRs)

説明

This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-05-22).

Problem

Tests intercept RSC fetches that follow a server-driven redirect or rewrite and expect the new request URL to still carry the _rsc query param. vinext does not preserve _rsc on the redirected/rewritten URL, so the intercepted URL does not match the matcher.

toContain('_rsc') matcher received null/undefined URL

Estimated Impact

~2 test failures across the deploy suite.

Affected Test Suites

  • test/e2e/app-dir/rsc-query-routing/rsc-query-routing.test.ts (2 failures)

Recommendation

  1. Reproduce first in vinext's own test suite. Add a test that performs an RSC navigation that hits a redirect/rewrite and asserts the follow-up request URL still carries _rsc.

  2. Preserve _rsc across redirect/rewrite. When the server returns a redirect/rewrite in response to an RSC request, the new request URL should retain the _rsc query param so it is treated as an RSC fetch.


Part of #1328.

コントリビューターガイド