Skip to content

feat(console): overview outcome mix, cache/streaming/canceled metrics, cooldown details - #359

Merged
caigee-cmd merged 3 commits into
mainfrom
feat/overview-stats
Oct 22, 2026
Merged

caigee-cmd merged 3 commits into
mainfrom
feat/overview-stats

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

Frontend-only change to the Overview page.

Ranking card 3 now shows a stacked status bar (ok / incomplete / error / canceled from /api/logs/stats status), the error mix, and top accounts together.

New metric cards (from /api/logs/stats): cache hit rate = tokens.cache_read / tokens.prompt, streaming share = totals.streaming / totals.requests, canceled count = totals.canceled.

Account pool card: each cooling account shows its reason (last_error_kind), a live countdown (later of down_until / cooldown_until), and restart_backoff_level. The stat row adds the session-affinity hit rate, routing.session_affinity.hits / (hits + misses) from /api/overview/summary.

  • I checked the field names in the Go code. AccountView (internal/accounts/types.go) has down_until, cooldown_until and restart_backoff_level. The pool's runtime kind is not on /api/accounts, but internal/runtime/manager_accounts.go copies it into last_error_kind when that is empty, so the reason uses last_error_kind.

Visual

  • Cards and .icon-tile get a surface treatment based on deeplethe/solid-glass (MIT): an inset top highlight, a near-invisible edge (4% light / 3% dark), a close shadow and a soft lift shadow, with separate dark-mode values. No new borders and no plugins.
  • .status-dot[data-state=ok] pulses. The pulse is off under prefers-reduced-motion.
  • CountUp is rebuilt on affectui motion/number-ticker.tsx (MIT; the copyright notice is in the file header). It keeps the existing formatter and props and starts right away, with no observer or delay. New digit columns slide in without fading. Skeletons still switch straight to content.

Release note: changelog/unreleased/overview-stats.md. internal/webui/static was regenerated with npm run sync.

…, cooldown details

- Third ranking card shows status stacked bar + error mix + top accounts
- New metric cards: cache hit rate, streaming share, canceled count
- Account pool: per-account cooldown reason/countdown/backoff, affinity hit rate
- Solid surface treatment for cards and icon tiles, status-dot pulse
- CountUp now based on affectui number-ticker (MIT)
…efresh

- Ranking rows (models, accounts, error kinds) link to /logs with filters + window
- Traffic chart drag-select (ReferenceArea) opens logs for the range
- LogsPage filters read from / written to the URL (two-way)
- Overview window: 30d and custom from/to (shared TimeRangePicker)
- Stats auto-refresh every 30s, pausable, skipped while hidden
feat(console): overview drill-down to logs, 30d/custom window, auto-refresh
@caigee-cmd
caigee-cmd merged commit ecafb6e into main Oct 22, 2026
6 checks passed
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