Skip to content

App Router: searchParams probe over-bails for inactive parallel-route slot pages #1798

Description

@james-elicx

Context

Follow-up from review of #1788 (searchParams static-bailout via access observation).

Problem

buildAppPageProbes (packages/vinext/src/server/app-page-probe.ts) probes every declared slot's page.default, including slots that are inactive for the current request.

At render time, a parallel-route slot with both page.tsx and default.tsx may render default (or have its page replaced by an interception override — see app-page-route-wiring.tsx slot resolution around the overrideOrPageComponent ?? defaultComponent logic). But the probe unconditionally invokes slot.page.default.

A route whose inactive @modal/page.tsx awaits searchParams therefore marks the whole request dynamic on a request where that page never renders, defeating static caching for an otherwise-static page.

Severity

This fails safe (toward dynamic — it never serves a stale query-bearing response), so it is a caching-efficiency regression, not a correctness/security issue.

Fix direction

Narrow the slot fan-out so only the slot pages that will actually render for the request are probed. This requires mirroring the render-time active-slot resolution (slot overrides from interception, mounted-slot state) which is currently computed in app-page-route-wiring.tsx and not readily available at probe time in the RSC entry. Extracting/sharing that active-slot resolution would let the probe and the render path agree on which slot components run.

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