← Inbox

Message

Three stages on one route. Resolve chips stamp how long after navigation start each panel painted.

Shellin App Shell — instant on soft nav

Prefetch budget for the inbox

Alex Rivera·Yesterday

Prefetchawait prefetch() — warm with prefetch={true}

Can we defer the full thread until click? Warming every message body on hover is too chatty for mobile.

Navigationawait navigation() — never in a prefetch
Alex RiveraYesterday

Can we defer the full thread until click? Warming every message body on hover is too chatty for mobile.

YouYesterday

Yes — await navigation() around the thread, keep the preview behind await prefetch().

Alex RiveraYesterday

Perfect. I'll wire Link prefetch={true} only on hover for the top few rows.

How the stages defer

import { prefetch as prefetchStage, navigation } from "next/cache";

async function PrefetchPreview({ id }) {
  await prefetchStage();          // out of shell; in per-link prefetch
  return <Preview data={await getCachedPreview(id)} />;
}

async function NavigationThread({ id }) {
  await navigation();             // only on real navigation
  return <Thread items={await getCachedThread(id)} />;
}