Skip to content

[Admin][UI] Usage & Spending dashboard (+ platform-AI kill switch) #39

Description

@serge-ivo

[Admin][UI] Usage & Spending dashboard (+ platform-AI kill switch)

Why

The visual home of the spend concern: make platform-paid AI cost unmissable and let the operator cut it off.

Scope

  • Headline: 30-day platform-paid spend $ with trend.
  • Breakdown tables/charts: by provider, by model, by kind (embedding/summary/translation/chat), by user (top spenders), by agent/instance. Window selector (1/7/30/90 days).
  • Clear platform-paid vs BYOK visual split (the platform only pays the platform-paid slice).
  • Platform-AI kill switch: a toggle bound to GET/PUT /v1/admin/settings/platform-ai, with an explicit warning that turning it off makes embeddings/summaries/translation no-op (RAG goes dark) — requires confirm; writes audit.

Acceptance criteria

  • All breakdowns render from /v1/admin/usage + /v1/admin/spending.
  • Platform-paid vs BYOK split is visually unambiguous.
  • Kill-switch toggle reflects + changes runtime state and is audit-logged.
  • Window selector re-queries; loading/empty/error states handled.

Relevant code

  • store/admin/ Usage page; consumes Usage/Spending API + platform-ai settings.

References

  • PAS PlatformAnalyticsPanel.tsx (SVG charts, window selector).

Part of the PAGS Admin Portal epic. Depends on UI scaffold + Usage & Spending API. Directly addresses the "platform should not pay for AI" concern.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    admin-portalPAGS admin/operator portalenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions