cloudflare/vinext

Optimistic routing (instant loading states for unprefetched routes) not implemented

Geschlossen

#1.360 geöffnet am 20.05.2026

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (384 Forks)github user discovery
adapter-api-e2ehelp wanted

Repository-Metriken

Stars
 (8.625 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-20).

Problem

Optimistic routing (a Next.js feature that shows instant loading states for dynamic routes that haven't been prefetched) is not implemented. Tests time out waiting for the optimistic loading state to appear when navigating to unprefetched dynamic routes.

Timed out waiting for a request to be initiated.
// The act() helper times out because no optimistic navigation occurs

Estimated Impact

~7 test failures.

Affected Test Suites

  • test/e2e/app-dir/optimistic-routing/optimistic-routing.test.ts (7 failures)

Recommendation

  1. Reproduce first in vinext's own test suite. Add a test that navigates to an unprefetched dynamic route and asserts a loading state appears immediately. Confirm it fails.

  2. Study the Next.js optimistic routing implementation. Search .nextjs-ref/packages/next/src/client/ for optimistic routing and loading state prediction.

  3. This is a client-side router feature. It requires the client-side router to optimistically render the nearest loading boundary for unprefetched routes while the RSC payload is being fetched.

Contributor Guide