Skip to content

Group the UI into 4 sections + add an Overview stats dashboard - #41

Merged
Mapika merged 5 commits into
mainfrom
feature/ui-ia-overview-dashboard
Jun 5, 2026
Merged

Group the UI into 4 sections + add an Overview stats dashboard#41
Mapika merged 5 commits into
mainfrom
feature/ui-ia-overview-dashboard

Conversation

@Mapika

@Mapika Mapika commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

The frontend had 11 flat, equal-weight nav pages and no real request-stats view. This regroups the UI by task and adds a proper Overview dashboard.

  • Navigation — 11 flat items → Overview · Serving · Observe · Admin · Playground, each revealing sub-tabs. A declarative nav.ts config drives the shell, and hash routing (#/section/tab) makes sub-tabs deep-linkable and reload-safe. Services splits into routes/profiles sub-tabs.
  • Overview dashboard — splits the old dashboard into read-only monitoring (here) and the load/stop/pin control table (moved to Serving › Deployments). Overview shows GPU health plus four request-stat tiles — volume, latency, errors, throughput. Latency/errors are a rolling ~60s window and are badged live · 60s; volume/throughput plus a 24h traffic chart and top-models come from real history.
  • Backend — one new read-only endpoint GET /admin/usage/series (bucketed request volume + tokens over a window, optional group_by=model|key) over the existing usage_events table. No schema change, no new storage; bounded by usage retention.

Deferred (separate spec): persisting latency/errors so they trend over days. Until then those two tiles are live-only, which the UI states explicitly.

Design + plan: docs/superpowers/specs/2026-06-05-ui-ia-redesign-and-overview-dashboard-design.md (local, gitignored).

Test Plan

  • Backend: 760 unit tests pass, incl. 8 new (series_in_window store + /admin/usage/series HTTP via the app fixture). ruff + mypy clean.
  • Frontend: tsc -b + vite build green (repo has no UI test framework).
  • End-to-end against a live isolated daemon (own home/port) seeded with realistic usage: /admin/usage/series returns correct buckets/groups; the Overview renders all tiles with data; nav sections, sub-tabs, and deep-links work; zero browser console errors.
  • Reviewer: sanity-check the Overview layout and the live-vs-history badging on a real instance.

🤖 Generated with Claude Code

Mapika and others added 5 commits June 5, 2026 18:28
Replace the 11-item flat top bar with Overview / Serving / Observe / Admin /
Playground, each revealing sub-tabs. Hash routing (#/section/tab) makes
sub-tabs deep-linkable and reload-safe. Services splits into routes/profiles
sub-tabs via a mode prop. All existing views re-homed unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Overview is now read-only monitoring (header summary + GPU health strip),
with a placeholder for the Phase 4 request-stat tiles. The load/stop/pin
control table moves to Serving>Deployments. GpuCard and Sparkline are
promoted to components/ for reuse; the old Dashboard.tsx and
cluster/Sparkline.tsx are retired.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add usage_events.series_in_window() — bucketed request volume + tokens over
a window, zero-filled and oldest-first, optionally grouped by model or key
(mirrors key_usage.bucketed_usage). Expose it as GET /admin/usage/series on
the admin router to power the Overview dashboard's volume/throughput tiles
and traffic-over-time/top-models history. Bounded by usage retention.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the stats dashboard to Overview: four StatTiles (volume, latency,
errors, throughput) with latency/errors badged "live · 60s"; volume and
throughput sourced from /admin/usage/series recent buckets, latency/errors
from the metrics snapshot via a request-weighted aggregateSnapshot helper.
Plus a 24h traffic-over-time bar chart and top-models table from usage
history, and a read-only deployments glance linking to Serving.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
series_in_window interpolated the group-by column into an f-string query,
which Bandit flagged as a possible SQL-injection vector (B608) and failed
the Security CI job. The column was always an internal whitelist value, not
user input, but switch to fully literal per-branch queries so there is no
string-built SQL at all. Behavior unchanged; tests still green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Mapika
Mapika merged commit cc9d6f0 into main Jun 5, 2026
3 checks passed
@Mapika
Mapika deleted the feature/ui-ia-overview-dashboard branch June 5, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant