cloudflare/vinext

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

已关闭

#1,360 创建于 2026年5月20日

 (1 条评论) (0 个反应) (0 位负责人)TypeScript (384 个派生)github user discovery
adapter-api-e2ehelp wanted

仓库指标

星标
 (8,625 个星标)
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.

贡献者指南