@@ -125,6 +114,31 @@ export function Sidebar({
{/* Scrollable nav area */}
+ {/* Top-level navigation */}
+
Navigation
+
+ {NAV_ITEMS.map((nav) => (
+
navigate(nav.path)}
+ role="button"
+ tabIndex={0}
+ onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') navigate(nav.path) }}
+ >
+
{nav.icon}
+
+
+ ))}
+
+
+
+
{/* Applications section */}
Applications
@@ -166,15 +180,15 @@ export function Sidebar({
className={[
styles.item,
styles.indented,
- activeItem === route.id ? styles.active : '',
+ activeItem === route.id || location.pathname === `/routes/${route.id}` ? styles.active : '',
]
.filter(Boolean)
.join(' ')}
- onClick={() => onItemClick?.(route.id)}
+ onClick={() => { onItemClick?.(route.id); navigate(`/routes/${route.id}`) }}
role="button"
tabIndex={0}
onKeyDown={(e) => {
- if (e.key === 'Enter' || e.key === ' ') onItemClick?.(route.id)
+ if (e.key === 'Enter' || e.key === ' ') { onItemClick?.(route.id); navigate(`/routes/${route.id}`) }
}}
>
▸