Skip to content

feat(metrics): add time ranges to dashboard metrics and security anomalies - #91

Merged
Bccorb merged 1 commit into
mainfrom
feat/ranged-dashboard-metrics
Oct 7, 2026
Merged

Bccorb merged 1 commit into
mainfrom
feat/ranged-dashboard-metrics

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Refs fells-code/seamless-auth-api#132.

The two internal endpoints that fed the operator screens without a range get one, so the dashboard can offer a single range control (fells-code/seamless-auth-admin-dashboard#148).

  • Queries: DashboardMetricsQuerySchema (from, to) and SecurityAnomaliesQuerySchema (from, to, limit 1 to 200 defaulting to 200, offset defaulting to 0). The range validation (valid dates, from <= to, at most about a year) is factored out of MetricsQuerySchema, so all three agree.
  • Dashboard metrics response: new optional window-neutral fields newUsers, loginSuccess, loginFailed, successRate, otpUsage, passkeyUsage, plus window. They cover the requested window. The *24h fields keep meaning the last 24 hours, so no existing field changes meaning; that was the agreed answer to the naming question in #132.
  • Anomalies response: optional window, limit, offset. total is documented as every match in the window. Before this, servers reported the capped returned count there.

Everything new in the responses is optional, so older servers still parse. Minor bump.

Checks: lint, typecheck, format, build, tests (286 passed), including the new parsing tests for both queries and backward-compatible responses.

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