# NOTES-PAGES.md: page audit An audit of every internal link in `web/src` against every route `astro build` actually emits, plus a crawl of the built `dist/` for links that resolve to nothing and anchors that point at ids no page has. Findings first, then what was built to close them. Audit run against 58 indexed mints, API up. Re-run it with: ```bash pnpm build && node web/scripts/check-links.mjs web/dist ``` `LIST_TARGETS=1` on that command prints every distinct internal target and which pages link to it. The checker exits non-zero on a problem, so it can gate a deploy. ## 1. Findings Routes are listed once each. "Linked from" is where the link lives in the source, not every page that renders the component. | Route | Linked from | Existed before | Action | |---|---|---|---| | `/` | Topbar brand, 404 | yes | none | | `/mints` | Topbar nav, Footer, home hero + CTA + section links, mint page breadcrumb, 404 | yes | none | | `/mints?sort=reviews` `?sort=rating` `?sort=recent` | home quick filters | yes (handled by the island) | none | | `/mints?nut=17` | home quick filter "Supports WebSockets" | route yes, filter **no** | **not fixed**, see below | | `/mints#mint-search` | Topbar search affordance | id exists, link never renders | **not fixed**, see below | | `/mint/[host]` | MintCard, home review cards | yes, 58 prerendered | none | | `/about` | Topbar nav, Footer, home CTA | yes | none | | `/about#nip87` | home "Signed, not submitted" card | yes | none | | `/about#nuts` | mint page NUT panel | yes | none | | `/wallets` | Topbar nav, Footer | yes | none | | `/#latest-reviews` | Topbar nav "Reviews" | anchor existed | **changed**: nav now points at `/reviews` | | `/reviews` | nothing linked to it | **no** | **built** | | `/terms` | nothing linked to it | **no** | **built**, linked from the footer | | `/privacy` | nothing linked to it | **no** | **built**, linked from the footer | | `/disclaimer` | nothing linked to it | **no** | **built**, linked from the footer and every mint page | | `/404` | (served by nginx on a miss) | yes | **reworked**, see below | | `/sitemap.xml` | nothing | **no** | **built** | | `/robots.txt` | nothing | **no** | **built** | | `/api/*`, `/icons/*` | mint icons, islands | not in `dist` by design | none: nginx proxies both to the API | The link crawl over the built site found **zero** broken internal links and **zero** dead anchors, before and after. Nothing pointed at the missing pages, which is exactly why they were easy to miss: the gap was between the page inventory and the navigation, not inside the navigation. ### Findings not closed by this task **`/mints?nut=17` does nothing.** The home page offers "Supports WebSockets" as a quick filter and links to `/mints?nut=17`. The `/mints` island reads `q` and `sort` from the query string and ignores everything else, so the link lands on an unfiltered list. The fix is not one line: `MintListItem` (the payload `/api/mints` returns and the only data `/mints` has) carries no `nuts` array, so `MintCard` has nothing to put in a `data-nuts` attribute. Either the API adds `nuts` to the list payload, or `/mints` fetches all 58 mint details at build time the way `/mint/[host]` already does. Worth doing, out of scope for a page audit. **`/mints#mint-search` never renders.** `Topbar` shows a "Search N mints" affordance only when a `mintCount` prop is passed. Nothing passes a number: the mint page passes `mintCount={undefined}` explicitly and no other page passes it at all, so the anchor is never in the emitted HTML. The knock-on is in `Base.astro`: the `/` key handler falls back to "no search box on this page, so follow the topbar search link", and that branch is unreachable, so `/` does nothing on the mint pages, `/about`, `/wallets` and the three new legal pages. Either pass the real count from `/mints` and the mint pages, or drop the affordance and the fallback branch. **Islands and the view transitions router.** `Base.astro` now renders `` (added by concurrent work on the site, not by this task). Under it, a same-site navigation swaps the document without re-running page scripts, and no island on the site re-initialises on `astro:page-load`: `/mints` search and sort, the mint page reviews panel, the pulse ticker and the new `/reviews` feed all run once, on the first full page load. Every island needs the same `astro:page-load` treatment the reveal script in `Base.astro` already has. Flagged rather than fixed here, because it is one cross-cutting change across every island and it belongs with the router work. ## 2. What was built, and what was already there ### Built - **`/reviews`** (`web/src/pages/reviews.astro`). The global feed: every mint's reviews in one list, newest first. - Build time: the 30 most recent written reviews are read from the relays and prerendered, so the page has real content for a crawler and for a reader with JavaScript off. The controls hide themselves through a `