feat(web): add Insights sidebar nav link (TASK-1636) (#644)

Add an "Insights" nav item to the workspace sidebar directly under Dashboard,
routing to /[username]/[workspace]/insights (the Reports surface, TASK-1633).
Mirrors the existing nav-item pattern with an isInsightsPage active state.
No dashboard widget/CTA (owner directive — keep the dashboard uncluttered).

Parent: PLAN-1628.
This commit is contained in:
xarmian
2026-05-29 11:03:24 -04:00
committed by GitHub
parent 5afacaf478
commit 1a728fe51a
@@ -30,6 +30,7 @@
let wsPrefix = $derived(wsUsername && wsSlug ? `/${wsUsername}/${wsSlug}` : '');
let isGuest = $derived(workspaceStore.current?.is_guest ?? false);
let isDashboardPage = $derived(wsPrefix ? page.url.pathname === wsPrefix : false);
let isInsightsPage = $derived(wsPrefix ? page.url.pathname === `${wsPrefix}/insights` : false);
let isRolesPage = $derived(wsPrefix ? page.url.pathname === `${wsPrefix}/roles` : false);
let isActivityPage = $derived(wsPrefix ? page.url.pathname === `${wsPrefix}/activity` : false);
let isStarredPage = $derived(wsPrefix ? page.url.pathname === `${wsPrefix}/starred` : false);
@@ -412,6 +413,15 @@
<span class="nav-icon">📊</span>
<span class="nav-label">Dashboard</span>
</a>
<a
href="{wsPrefix}/insights"
class="nav-item"
class:active={isInsightsPage}
onclick={() => uiStore.onNavigate()}
>
<span class="nav-icon">📈</span>
<span class="nav-label">Insights</span>
</a>
<a
href="{wsPrefix}/roles"
class="nav-item"