rsnext/test/e2e/app-dir/navigation/app
Jude Gao d498f9c173
Fix router.refresh missing canonical url override (#65999)
Fixes https://github.com/vercel/next.js/issues/65970

----

The browser update happens at
10d5c278bc/packages/next/src/client/components/app-router.tsx (L685),
which sets the browser location to `canonicalUrl`. `canonicalUrl` was
correctly set at
ab03c3261f/packages/next/src/client/components/router-reducer/reducers/refresh-reducer.ts (L98),
but then mistakenly overriden at
51549d92de/packages/next/src/client/components/router-reducer/reducers/refresh-reducer.ts (L129).

This PR fixes that and includes an E2E test to prevent future
regression.

---------

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
2024-05-20 18:11:07 -07:00
..
api/set-token Fix router.refresh missing canonical url override (#65999) 2024-05-20 18:11:07 -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 refresh behavior for discarded actions (#64532) 2024-04-16 06:56:48 -07: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 Support React 19 in App and Pages router (#65058) 2024-05-07 18:18:32 +02:00
redirect fix redirect to url with semicolon (#65165) 2024-05-01 13:11:41 -07:00
redirect-dest
redirect-on-refresh Fix router.refresh missing canonical url override (#65999) 2024-05-20 18:11:07 -07:00
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