Skip to content

feat: add cost dashboard (Usage tab) to Settings#46

Merged
SpaceHunterInf merged 1 commit into
mainfrom
feature/cost-dashboard
Jun 6, 2026
Merged

feat: add cost dashboard (Usage tab) to Settings#46
SpaceHunterInf merged 1 commit into
mainfrom
feature/cost-dashboard

Conversation

@SpaceHunterInf

Copy link
Copy Markdown
Collaborator
  • New UsageTab component showing total spend, daily average, API calls, and token usage with an interactive bar chart
  • Time range selector (7d / 14d / 30d) for adjustable cost windows
  • Token breakdown visualization (input vs output) with proportional bars
  • Consumes existing backend routes: /config/cost/global, /config/cost/daily
  • Added fetchGlobalCost and fetchDailyCost API client functions
  • Full i18n support (English + Simplified Chinese)
  • Dollar-sign icon in settings sidebar between Data and Appearance tabs

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

- New UsageTab component showing total spend, daily average, API calls,
  and token usage with an interactive bar chart
- Time range selector (7d / 14d / 30d) for adjustable cost windows
- Token breakdown visualization (input vs output) with proportional bars
- Consumes existing backend routes: /config/cost/global, /config/cost/daily
- Added fetchGlobalCost and fetchDailyCost API client functions
- Full i18n support (English + Simplified Chinese)
- Dollar-sign icon in settings sidebar between Data and Appearance tabs
@SpaceHunterInf SpaceHunterInf merged commit 48b21c9 into main Jun 6, 2026
1 check 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