cloudflare/vinext

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

已關閉

#1,360 建立於 2026年5月20日

 (1 則留言) (0 個反應) (0 位負責人)TypeScript (385 個分叉)github user discovery
adapter-api-e2ehelp wanted

倉庫指標

星標
 (8,633 顆星)
PR 合併指標
 (平均合併 1天 1小時) (30 天內合併 462 個 PR)

描述

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.

貢獻者指南