Skip to content

[Responsiveness] Prefetch-on-intent for profile/cast navigation #737

Open

Description

@hellno

Part of #744 (folded into Track B). Addresses profile navigation.

Reframed (architecture decision): intent-based prefetch becomes native under the planned
TanStack Start migration — route loaders + preload="intent" prefetch profile/cast data on
hover/intent without hand-rolling it. This issue is therefore folded into the TanStack Start epic
(Track B)
rather than implemented separately on Next.

Keep open as the acceptance criterion for that part of the migration. If the Start migration slips and
we want the win sooner, the fallback is a small Next-side queryClient.prefetchQuery on
onMouseEnter/onMouseDown of profile links and cast rows (using existing src/lib/queryKeys.ts).

Problem

Clicking a profile/cast fetches data only after the route commits, so nav stalls 0.5–2s. Links are
prefetch={false}; no prefetchQuery in the repo.

Target metric

Profile/cast nav INP (tap → first content paint) < 200ms on warm intent. Measure via nav:/profile

  • INP instrumentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions