cloudflare/vinext

App Router: client router filter applied to shallow `pushState` and Pages Router redirects

Geschlossen

#1.522 geöffnet am 22.05.2026

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (371 Forks)github user discovery
adapter-api-e2ehelp wanted

Repository-Metriken

Stars
 (8.563 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 1T 1h) (462 gemergte PRs in 30 T)

Beschreibung

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

Several App Router redirect/router tests time out. router.pushState to a path matching a server-side redirect (e.g. /redirect-1) does not stay on the shallow path — it gets rewritten/redirected. Pages Router redirects invoked from App Router do not fire (URL stays at /).

router.pushState('/redirect-1') gets redirected away from the shallow path

Estimated Impact

~2 test failures across the deploy suite.

Affected Test Suites

  • test/e2e/app-dir/app/index.test.ts (2 failures)

Recommendation

  1. Reproduce first in vinext's own test suite. Add a test that calls history.pushState/router.pushState to a path that has a server-side redirect rule and assert the URL stays on the shallow path.

  2. Skip the client router filter for shallow updates. Shallow pushState should not run through the server redirect table. Make sure the rewrite/redirect filter only applies to real navigations.

  3. Fix Pages Router redirect dispatch. The redirect-from-app-router-to-pages-router path also needs to actually fire the redirect; currently the URL stays at /.


Part of #1328.

Contributor Guide