feat(webui): redesign the admin dashboard around admin tasks

A sidebar replaces the flat tabs with seven pages, and one filter bar
sets the time range, comparison period and scope for all of them.

- Home: spend against budget, forecast, request rate, error rate,
  open breakers, top users and models, recent events and warnings.
- Spend: spend over time with comparison, budget burn-down, an
  attribution drill-down from group to user to model, pricing health
  and cost avoided by free models.
- Consumers: a directory with last seen and limit bars, an access
  matrix, and a detail page per user.
- Models: the catalog with billing prices, fleet latency and error
  rates, and provider health.
- Reliability: error, timeout, failover, 429 and 402 trends, events,
  and latency per provider.
- Config: the redacted config and a change helper that emits YAML or
  users.json snippets to paste into git.
- MCP & Agents: callers per target.

Page state lives in the URL hash, and old tab links map to the new
pages. The replaced views are removed. admin_assets_gen.go is
regenerated.

Claude-Session: https://claude.ai/code/session_01V5jYJNxpDFdJkyyExpADrv
This commit is contained in:
2026-09-23 16:41:01 +01:00
parent e8abb91dc8
commit ee49467e64
127 changed files with 11226 additions and 3414 deletions
+6 -5
View File
@@ -25,8 +25,9 @@ const ALL_KINDS = 'all'
// kindFilter/userFilter live on the store, not as local refs (F9,
// hash-state): composables/useHashState.ts reads/writes them directly so
// this filter round-trips through the URL hash. userFilter binds through
// useSearchQuery's own external-ref option, the same way UsageView.vue
// binds nav.usageQuery — see useSearchQuery.ts's own doc comment.
// useSearchQuery's own external-ref option — see useSearchQuery.ts's own
// doc comment for the other current external-ref caller
// (ConsumerDirectory.vue).
const { kindFilter, userFilter } = storeToRefs(events)
const { normalized: normalizedUserQuery } = useSearchQuery(userFilter)
@@ -48,9 +49,9 @@ function onKindChange(value: unknown): void {
const columns = eventsColumns()
/**
* emptyMessage mirrors TargetsView.vue/UsageView.vue's own three-way
* pattern: distinguishes "nothing recorded at all" from "nothing matches
* the active filter".
* emptyMessage mirrors TargetsView.vue/ConsumerDirectory.vue's own
* three-way pattern: distinguishes "nothing recorded at all" from
* "nothing matches the active filter".
*
* P9 review fix: gated on events.lastUpdated (null until the first fetch
* settles, stores/events.ts) — this used to read events.events.length