refactor prefetch alias handling (#70532)
This adjusts the implementation of prefetched alias handling to be no longer be sprinkled throughout the existing navigation handler. Ultimately the goal will be to delete this handling once we have per-segment fetching, so keeping it in a single place will make that easier to do. This PR introduces a few changes to the previous behavior: - If we've determined an alias is to be used, it will recursively copy the canonical search params into the `FlightRouterState`. This is because an aliased entry won't necessarily correspond with the search params for the URL being navigated to, and we encode search params into the `FlightRouterState`. - Now we check to see if the aliased entry has any loading segments. If not, there's no work to be done, so we return to the regular navigation behavior and kick off a temporary prefetch for the page being navigated to. - In the case of constructing a new tree (ie from a navigation corresponding with a static page or something that started rendering from the root), previously we were only copying the root level into the cache. This updates the handling to construct a full tree with only the loading segments. Caught by failing test in #68305 when used with PPR, so this re-enables that test.
Showing
Please
register
or
sign in
to comment