From 4baebf776158cdc868c83a560dfcfe687839d3c8 Mon Sep 17 00:00:00 2001 From: John Leider Date: Mon, 20 Jul 2026 11:26:50 -0500 Subject: [PATCH] chore(analytics): fill Analytics tab with Progress quota bars Add a thin DkProgress wrapper over the v0 Progress compound and replace the Analytics "coming soon" stub with four product-shaped quota metrics (request plan, active keys, error budget, rate-limit headroom). --- src/components/DkProgress.vue | 80 +++++++++++++++++++++++++++++++++++ src/pages/DashboardPage.vue | 73 ++++++++++++++++++++++++++++++-- 2 files changed, 149 insertions(+), 4 deletions(-) create mode 100644 src/components/DkProgress.vue diff --git a/src/components/DkProgress.vue b/src/components/DkProgress.vue new file mode 100644 index 0000000..b2b340c --- /dev/null +++ b/src/components/DkProgress.vue @@ -0,0 +1,80 @@ + + + + + diff --git a/src/pages/DashboardPage.vue b/src/pages/DashboardPage.vue index 88bd8f1..29b72ac 100644 --- a/src/pages/DashboardPage.vue +++ b/src/pages/DashboardPage.vue @@ -20,6 +20,7 @@ import DkCommandPalette from '../components/DkCommandPalette.vue' import DkLogo from '../components/DkLogo.vue' import DkCreateKeyDialog from '../components/DkCreateKeyDialog.vue' + import DkProgress from '../components/DkProgress.vue' import { useKeys } from '../composables/useKeys' defineOptions({ name: 'DkDashboardPage' }) @@ -37,6 +38,39 @@ { label: 'Error Rate', value: '0.3%', icon: mdiAlertCircleOutline }, ] + // Demo analytics quotas — product-shaped Progress surfaces, not live metrics. + const analytics = [ + { + id: 'requests', + label: 'Monthly request quota', + value: 240_000, + max: 1_000_000, + format: (total: number, max: number) => + `${(total / 1000).toFixed(0)}k / ${(max / 1000).toFixed(0)}k`, + }, + { + id: 'keys', + label: 'Active keys vs plan limit', + value: 24, + max: 50, + format: (total: number, max: number) => `${total} / ${max}`, + }, + { + id: 'errors', + label: 'Error budget remaining', + value: 97, + max: 100, + format: (total: number) => `${total}% remaining`, + }, + { + id: 'rate', + label: 'Rate-limit headroom', + value: 720, + max: 1000, + format: (total: number, max: number) => `${total} / ${max} rpm`, + }, + ] + const sidebarSections = [ { label: 'Overview', icon: mdiViewDashboard, items: ['All Keys', 'Create New', 'Rotate'] }, { label: 'Management', icon: mdiCog, items: ['Overview', 'Usage', 'Errors'] }, @@ -159,10 +193,23 @@ />