From c483d51dc73d0f36225ac0a4fbddcb802dd67f55 Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Tue, 6 Oct 2026 14:10:10 +0300 Subject: [PATCH] fix(web): mark a section's nav link on its subjects' pages, not only its index `/quantus/market/near-intents` marked nothing in the section nav, nor did a block, account or runtime page: the nav tested the index plus a hand-kept list of exceptions that every newer section had missed. `sectionOf` in lib/routes.ts now answers it once, over every subject field. Block zero stays with Genesis alone. Closes #40 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_015pkwBsR54NRmZyU4QVhvfj --- web/src/components/SectionNav.tsx | 15 ++++----------- web/src/lib/routes.ts | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/web/src/components/SectionNav.tsx b/web/src/components/SectionNav.tsx index cc33199..806e985 100644 --- a/web/src/components/SectionNav.tsx +++ b/web/src/components/SectionNav.tsx @@ -15,7 +15,7 @@ import { Link } from 'react-router-dom' import type { Window as WindowName } from '../api/generated/Window' -import { href, isStandings, type Route, SECTIONS } from '../lib/routes' +import { href, isStandings, type Route, SECTIONS, sectionOf } from '../lib/routes' export function SectionNav({ chain, @@ -31,6 +31,7 @@ export function SectionNav({ if (!chain) return null // The standings are current when nothing else is: no panel open, no index. const onStandings = isStandings(route) + const current = sectionOf(route) return (