Previously, we shared how a coding agent used the instant() Playwright test helper to make navigations instant in v0 , Vercel's AI app builder. That work focused on the core /chat experience.
In other parts of v0, users saw loading skeletons when they returned to pages they had already opened. Useful content was not always ready before the first click, either. We wanted those pages to behave more like a single-page app, with content prefetched on the way in and still available on the way back.
Next.js 16.3 introduced Partial Prefetching. Next.js 16.4 added more control over when cached content loads, along with the new next-partial-prefetching-optimizer Skill for optimizing what gets prefetched.
This is an excerpt. The full article is published by Next.js Blog.
Answers to common questions regarding this article's topic, architecture, and practical applications.
Previously, we shared how a coding agent used the instant() Playwright test helper to make navigations instant in v0, Vercel's AI app builder. That work focused on the core /chat experience.
How It Works
We asked an agent with the Skill installed to run this workflow across v0 and split the work into feature-specific PRs. For each PR, we tried the interaction in the preview before merging, then tracked four production metrics after it shipped: Let's look at a few examples of how the Skill worked.
General
Each navigation needed a clear, testable target for the prefetched UI. The instant() Playwright helper acts as a lock around the click. It holds back content that only arrives during navigation, so a test can assert on the UI available before the click: import { instant } from '@next/playwright';
import { expect, test } from '@playwright/test';
test('prefetches the primary template UI', async ({ page }) => {
await page.goto('/templates');
c
General
In previous versions of Next.js, prefetch={true} fetched the entire destination, including dynamic content. This could fetch pages users never opened, while clicking before the prefetch finished still led to a slow navigation. Turning prefetching off avoided those requests but moved all of the work until after the click. With Partial Prefetching, Next.js prefetches the reusable parts of a route so they're ready before the click, while the rest lo
General
To automate this process, Next.js 16.4 includes the new next-partial-prefetching-optimizer Skill. It guides an agent through the following loop until the instant() test passes: Choose the navigation and target UI
│
▼
Write a passing instant() test for the current UI
│
▼
Add the target assertions and confirm they fail
│
▼
Refactor the app ◀────────────────