From af48bd2fa0b6b391a848b6e45f05df281cc93bf2 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Wed, 1 Apr 2026 20:59:15 +0200 Subject: [PATCH] fix: sidebar highlighting works on all tabs, not just exchanges Remove the /exchanges/ path guard so sidebarRevealPath is used whenever available, enabling correct sidebar selection on dashboard, runtime, and all other tabs when navigating via Cmd-K. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/design-system/layout/Sidebar/Sidebar.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/design-system/layout/Sidebar/Sidebar.tsx b/src/design-system/layout/Sidebar/Sidebar.tsx index 00c2e7f..b67105b 100644 --- a/src/design-system/layout/Sidebar/Sidebar.tsx +++ b/src/design-system/layout/Sidebar/Sidebar.tsx @@ -323,11 +323,9 @@ export function Sidebar({ apps, className, onNavigate }: SidebarProps) { const starredRouteStats = starredItems.filter((i) => i.type === 'routestat') const hasStarred = starredItems.length > 0 - // For exchange detail pages, use the reveal path for sidebar selection so - // the parent route is highlighted (exchanges have no sidebar entry of their own) - const effectiveSelectedPath = location.pathname.startsWith('/exchanges/') && sidebarRevealPath - ? sidebarRevealPath - : location.pathname + // When a sidebar reveal path is provided (e.g. via Cmd-K navigation), + // use it for sidebar selection so the correct item is highlighted + const effectiveSelectedPath = sidebarRevealPath ?? location.pathname return (