Skip to content

feat(console): overview drill-down to logs, 30d/custom window, auto-refresh - #360

Merged
caigee-cmd merged 1 commit into
feat/overview-statsfrom
feat/overview-drilldown
Oct 22, 2026
Merged

caigee-cmd merged 1 commit into
feat/overview-statsfrom
feat/overview-drilldown

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

Stacked on #359 (base feat/overview-stats). Frontend only.

Drill-down

  • Rows in Top models, Top accounts and the error mix now link to /logs?model=|account=|error_kind=&from=&to=. from/to come from the overview's current stats window (window.from/to in the stats response).
  • Provider rows are not clickable because /api/logs/requests has no provider filter. The handler in internal/console/logs.go accepts account, status, error_kind, model, id, q, from, to, stream, limit, offset.
  • Unknown or unassigned rows and error kinds missing from the logs page's error_kind select are not linked.
  • Dragging across TrafficChart draws a recharts ReferenceArea. On mouse-up it opens the logs page for [first bucket, last bucket + step).
  • LogsPage reads status, account, model, error_kind, stream, id, range, from, to from the URL. It updates the URL (replace) when its filters change, and updates the filters when the URL changes (back/forward).
  • The logs picker works in whole minutes and rounds the end up to :59.999. Drill-down links pass the end as one minute before its minute ceiling, so the range comes out exact after that rounding.

Time window

  • The window options are now 1h, 24h, 7d, 30d and custom. Custom uses a shared TimeRangePicker that was pulled out of LogsPage (HeroUI DateRangePicker + RangeCalendar).
  • The backend NormalizeStatsHours only accepts hours=1|24|168, so 30d and custom send from/to as RFC 3339 UTC. ParseQueryTime accepts that format.
  • Stats refresh quietly every 30s (no skeleton; errors during a background refresh are ignored). A pause/play icon button stops the refresh. No refresh runs while document.hidden, and one catch-up refresh runs when the tab becomes visible again.
  • The chart's line draw-in now plays once per mount, so background refreshes don't replay it.
  • The recharts focus outline on the plot is removed.

…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
@caigee-cmd
caigee-cmd merged commit 8c50c15 into feat/overview-stats 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