Skip to content

[AIDE-122] Usage Updates - #95

Merged
chandlerhuff merged 2 commits into
mainfrom
feature/AIDE-122-usage-updates
Aug 26, 2026
Merged

[AIDE-122] Usage Updates#95
chandlerhuff merged 2 commits into
mainfrom
feature/AIDE-122-usage-updates

Conversation

@chandlerhuff

Copy link
Copy Markdown
Member

Summary

Enhances the usage dashboard with spend records and a configurable usage end date. The page now shows "Spend records" tiles with the highest 7-day and 30-day spend windows across all retained usage, and a calendar date picker that lets users bound the rolling ranges to a specific end date instead of always ending today.

Changes

  • Added spendPeaks GraphQL field returning the highest rolling 7-day and 30-day spend windows (CcusageSpendWindow/CcusageSpendPeaks), computed across all retained dates while honoring history, agent, and model filters.
  • Added an optional endDate argument to the aggregate query field so bounded ranges (7/30 days) use a specific inclusive end date instead of today; ignored for ALL and validated as strict YYYY-MM-DD.
  • Added a calendar end-date picker to the usage page (shown only for bounded ranges) that disables future dates and refetches usage for the selected end date.
  • Changed the default range from ALL to LAST_30_DAYS so spend records are visible by default.
  • Spend records refresh when the active agent or model filter changes, without triggering a new data collection.
  • Added aggregation utilities (highestUsageSpendWindow, usageSpendPeaks, filterUsageByModel, usagePeriodForDate, usagePeriodToDate) and extended filterUsageByDays with an upper date bound; peaks tie-break to the latest window.
  • Localized new strings in English, German, Spanish, and French, including accessible labels for the spend record tiles and date picker.
  • Added unit and component tests covering end-date filtering, date validation, spend-window calculation, and resolver wiring.

Ticket: AIDE-122

Add a spendPeaks GraphQL resolver that reports the highest 7-day and
30-day spend windows across retained usage, honoring history, agent,
and model filters. Surface the peaks as spend record tiles on the
usage page and let bounded ranges select an inclusive end date via a
calendar picker with strict YYYY-MM-DD validation. Refresh spend
records when filters change without recollecting.
@chandlerhuff chandlerhuff self-assigned this Aug 20, 2026
@chandlerhuff
chandlerhuff merged commit 2a99252 into main Aug 26, 2026
3 checks passed
@chandlerhuff
chandlerhuff deleted the feature/AIDE-122-usage-updates branch August 26, 2026 22:59
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