rsnext/test/e2e/app-dir/navigation/app
Zack Tanner c116da32de
fix double redirect when using a loading boundary (#63786)
### What & Why
When an RSC triggers `navigate` after the shell has already been sent to
the client, a meta tag is inserted to signal to the browser it needs to
perform an MPA navigation. This is primarily used for bot user agents,
since we wouldn't have been able to provide a proper redirect status
code (since it occurred after the initial response was sent).

However, the router would trigger a SPA navigation, while the `<meta>`
tag lagged to perform an MPA navigation, resulting in 2 navigations to
the same URL.

### How
When the client side code attempts to handle the redirect, we treat it
like an MPA navigation. This will suspend in render and trigger a
`location.push`/`location.replace` to the targeted URL. As a result,
only one of these navigation events will win.

Fixes #59800
Fixes #62463

Closes NEXT-2952
Closes NEXT-2719
2024-03-28 16:08:39 -07:00
..
assertion Export RedirectType from next/navigation (#54729) 2023-08-29 11:05:44 -07:00
dynamic-param-casing-change fix navigation issue when dynamic param casing changes (#61726) 2024-02-06 08:59:18 -08:00
external-push/[storageKey] app router: Fix infinite redirect loop in MPA navigation (#49058) 2023-05-03 11:04:53 +02:00
hash App Router: fix relative query/hash handling in next/link and router push/replace (#49521) 2023-05-28 10:29:00 -07:00
hash-changes Support scroll: false for Link component for app router (#51869) 2023-07-04 10:25:25 +02:00
hash-link-back-to-same-page Fix going back to page after applying hash link (#50006) 2023-05-18 16:33:58 -07:00
hash-link-to-pages-router fix(next/client): keep hash when navigating from app to pages router (#56223) 2023-10-02 14:43:04 -07:00
hash-with-scroll-offset fix: app router hash scrolling should respect scroll-padding (#51268) 2023-06-13 20:50:51 -07:00
metadata-await-promise fix loading issue when navigating to page with async metadata (#61687) 2024-02-06 07:10:53 -08:00
mpa-nav-test fix: ensure mpa navigation render side effects are only fired once (#55032) 2023-09-07 20:53:07 +00:00
nested-navigation fix infinite navigate events when Promise is proxied (#54394) 2023-08-24 16:22:48 +00:00
nested-relative-query-and-hash App Router: fix relative query/hash handling in next/link and router push/replace (#49521) 2023-05-28 10:29:00 -07:00
not-found Failing tests for 404 back/forward (#50047) 2023-05-22 17:04:36 +02:00
popstate-revalidate fix router crash on revalidate + popstate (#62383) 2024-02-27 10:15:36 -08:00
redirect fix double redirect when using a loading boundary (#63786) 2024-03-28 16:08:39 -07:00
redirect-dest
router Fix client chunk loading encoding for dynamic route (#57960) 2023-11-02 23:09:25 +00:00
scroll-restoration fix inconsistent scroll restoration behavior (#59366) 2023-12-07 11:17:15 -08:00
search-params fix: Don't reset shallow URL updates on prefetch (#58297) 2023-11-14 19:29:18 +00:00
layout.js Add test for next-found and redirect for metadata (#46248) 2023-02-22 18:54:14 +01:00
page.js