#2002)
## Problem
- The Changelog link in the desktop header (`src/components/Layout.tsx`)
and mobile navigation (`src/components/MobileNavigation.tsx`) is a
`next/link` to `https://sourcegraph.com/changelog`
- Because it is same-origin in production, Next treats it as an app
route and prefetches the changelog app
- The audit measured 61 extra requests / ~500 KB on **every docs page
view**
## Fix
- Render both as plain `<a>`, the same approach #1978 takes for external
sidebar links
## Verification
- On a preview, the Network tab should show no `/changelog` chunk
requests after load
- Screenshot showing prod on the left, preview on the right, when
opening the left nav menu, prod has 137 requests, preview has 65
- Broken icon in prod in another PR, coming soon
<img width="2672" height="1521" alt="image"
src="https://github.com/user-attachments/assets/4f9a104f-cacc-4ebf-90fa-776da3b83eb1"
/>
- `npx tsc --noEmit` and `pnpm run lint` clean (0 errors)
Found by the docs site audit in [this Amp
thread](https://ampcode.com/threads/T-01a0ae50-f7f0-779c-aa66-3887c9953e33);
rebuilt locally in [this
one](https://ampcode.com/threads/T-01a0aed2-5fbe-7768-85ea-1378bf98f9ff).
Co-authored-by: Amp <amp@ampcode.com>
Stacked on #1976 (
marc/perf/sidebar-prefetch); retarget tomainonce that merges.Problem
navigation.tshas Pricing and Changelog entries withhref: 'https://sourcegraph.com/...'.next/linktreats an absolute URL on the current origin as an app route, so every page load prefetched the marketing pricing page (65 KB of HTML in the HAR). On versioned docs,prependVersionalso turns them into/v/<version>/https://sourcegraph.com/pricing.Fix
NavigationLinkrenders a plain<a>for anyhttp(s)://href.prependVersiononly prefixes paths that start with/.Verification
tsc,pnpm lint,pnpm buildclean. On the preview, the Network tab should show no request tosourcegraph.com/pricingon page load, and the Pricing link should still navigate.