From fe8a248c6ee33a7ea2e3064b612d32fb53bf898e Mon Sep 17 00:00:00 2001 From: Algis Dumbris Date: Tue, 25 Aug 2026 06:56:49 +0300 Subject: [PATCH 1/6] feat(webui): make the analytics dashboard the default landing page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Web UI now lands on the Dashboard's Usage (analytics) panel instead of the hub overview. `/usage` and `/overview` are added as deep-linkable routes rendering the same Dashboard component, so each panel survives a reload or a shared link and the tab switcher rewrites the URL (replace) without remounting the view or piling up history entries. First run (zero upstream servers) would show an empty chart grid, so the usage panel renders an "add your first server" CTA instead — no conditional routing, the landing page is the same for everyone. Roadmap: analytics-default-landing -> in_review (ROADMAP.md regenerated). --- ROADMAP.md | 7 +- frontend/src/components/SidebarNav.vue | 6 +- frontend/src/router/index.ts | 25 +++ frontend/src/views/Dashboard.vue | 120 ++++++++-- .../unit/dashboard-default-landing.spec.ts | 207 ++++++++++++++++++ .../unit/dashboard-usage-switcher.spec.ts | 86 +++++--- roadmap.yaml | 3 +- 7 files changed, 397 insertions(+), 57 deletions(-) create mode 100644 frontend/tests/unit/dashboard-default-landing.spec.ts diff --git a/ROADMAP.md b/ROADMAP.md index c08ca0a79..0b5477acc 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -136,15 +136,15 @@ graph LR analytics_token_drain_graphs --> analytics_default_landing classDef done fill:#1f7a1f,stroke:#0d3d0d,color:#ffffff; - classDef todo fill:#6e7781,stroke:#3d4248,color:#ffffff; + classDef in_review fill:#9a6700,stroke:#5c3d00,color:#ffffff; class analytics_token_drain_graphs done; - class analytics_default_landing todo; + class analytics_default_landing in_review; ``` | Task | Status | Refs | | --- | --- | --- | | Per-server / per-tool token-drain graphs | 🟢 Done | — | -| Make dashboard the default landing page | ⚪ Todo | — | +| Make dashboard the default landing page | 🟡 In review | — | @@ -804,3 +804,4 @@ Legend: `shipped` ≥95% checked · `in-flight` 1–94% · `drafted` 0% · `—` | [098-tools-preflight](./specs/098-tools-preflight/) | `in-flight` | 26/33 (79%) | | [099-describe-check-mode](./specs/099-describe-check-mode/) | `in-flight` | 9/10 (90%) | | [100-prompt-rugpull-baseline](./specs/100-prompt-rugpull-baseline/) | — | — | +| [102-schema-deferred](./specs/102-schema-deferred/) | — | — | diff --git a/frontend/src/components/SidebarNav.vue b/frontend/src/components/SidebarNav.vue index 5016eb6c2..bf20844a7 100644 --- a/frontend/src/components/SidebarNav.vue +++ b/frontend/src/components/SidebarNav.vue @@ -655,9 +655,13 @@ const userInitials = computed(() => { return name.substring(0, 2).toUpperCase() }) +// Dashboard panels are deep-linkable routes that all render the Dashboard, so +// the "Dashboard" entry stays highlighted on each of them. +const DASHBOARD_PATHS = ['/', '/usage', '/overview'] + function isActiveRoute(path: string): boolean { if (path === '/') { - return route.path === '/' + return DASHBOARD_PATHS.includes(route.path) } return route.path.startsWith(path) } diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.ts index 62a422280..2f8551ffd 100644 --- a/frontend/src/router/index.ts +++ b/frontend/src/router/index.ts @@ -12,12 +12,37 @@ const router = createRouter({ meta: { title: 'Sign In', public: true }, }, // Existing routes (admin/personal) + // + // The landing page (`/`) opens the Dashboard on its Usage (analytics) + // panel — that is the "analytics dashboard as default landing page" + // behaviour. `/usage` and `/overview` render the same Dashboard component + // so each panel is deep-linkable and survives a reload; `meta.dashboardView` + // is what the component reads to pick the active panel. { path: '/', name: 'dashboard', component: Dashboard, meta: { title: 'Dashboard', + dashboardView: 'usage', + }, + }, + { + path: '/usage', + name: 'usage', + component: Dashboard, + meta: { + title: 'Usage Analytics', + dashboardView: 'usage', + }, + }, + { + path: '/overview', + name: 'dashboard-overview', + component: Dashboard, + meta: { + title: 'Overview', + dashboardView: 'overview', }, }, { diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index 9564283df..b7fc837c6 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -6,15 +6,10 @@ - + + UsageView are mounted only once the panel has been active + (v-if="usageEverActive") and stay code-split behind Suspense, so the + Dashboard shell still paints immediately (SC-004). -->
- + +
+
+ + + +

Add your first server to see usage

+

+ No upstream MCP servers are configured yet, so there is nothing to chart. + Add one and this page will show call volume, token sinks, error rates and a timeline. +

+
+ + Browse Registry + +
+
+
+