Summary
The mobile drawer still forces a full page reload when one of its section links is tapped from another route (e.g. /blog/*, /legal/*). MobileMenu.tsx:177 calls window.location.assign(isHome ? "/" : /#${anchor}) in the drawer's close cleanup.
That reload was a workaround for the Next 16 App Router hash-appending bug (#116). Next 16.3.8 fixes that bug, and #270 already removes the matching workaround from the desktop nav (Chrome.tsx). The drawer should behave the same way, so it doesn't do a full page reload when the site can navigate without one.
Evidence (from #270)
The test drove headless Chrome against the static export:
router.push('/#method') after a reload gives /#method#method on Next 16.2.6 and a clean /#method on 16.3.8.
- Going to a section from another page with
router.push('/#id') lands on the same URL and the same scroll position as location.assign.
Proposed change
- In the drawer's close cleanup, replace
window.location.assign(...) with router.push(...) from next/navigation. Keep it after the body unlock, so the pinned position: fixed body is released before the navigation.
- Update the comment that calls the soft-nav path unreliable.
Acceptance
- From
/blog/, a blog post and /legal/privacy/ at mobile width, tapping each drawer section navigates without a reload, lands on the section with a single clean hash, and leaves the body unpinned.
- Tapping home from another route lands on
/ with no hash.
- Same-page drawer taps are unchanged.
Depends on #270 (the Next 16.3.8 bump).
Summary
The mobile drawer still forces a full page reload when one of its section links is tapped from another route (e.g.
/blog/*,/legal/*).MobileMenu.tsx:177callswindow.location.assign(isHome ? "/" :/#${anchor})in the drawer's close cleanup.That reload was a workaround for the Next 16 App Router hash-appending bug (#116). Next 16.3.8 fixes that bug, and #270 already removes the matching workaround from the desktop nav (
Chrome.tsx). The drawer should behave the same way, so it doesn't do a full page reload when the site can navigate without one.Evidence (from #270)
The test drove headless Chrome against the static export:
router.push('/#method')after a reload gives/#method#methodon Next 16.2.6 and a clean/#methodon 16.3.8.router.push('/#id')lands on the same URL and the same scroll position aslocation.assign.Proposed change
window.location.assign(...)withrouter.push(...)fromnext/navigation. Keep it after the body unlock, so the pinnedposition: fixedbody is released before the navigation.Acceptance
/blog/, a blog post and/legal/privacy/at mobile width, tapping each drawer section navigates without a reload, lands on the section with a single clean hash, and leaves the body unpinned./with no hash.Depends on #270 (the Next 16.3.8 bump).