Skip to content

feat(dashboard): show exact token counts on hover in usage analytics cards and tables - #12553

Open
ZaimMarzuki wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
ZaimMarzuki:feat/analytics-token-hover-tooltip
Open

feat(dashboard): show exact token counts on hover in usage analytics cards and tables#12553
ZaimMarzuki wants to merge 1 commit into
diegosouzapw:release/v3.8.51from
ZaimMarzuki:feat/analytics-token-hover-tooltip

Conversation

@ZaimMarzuki

Copy link
Copy Markdown
Contributor

Summary

Shows the exact uncompacted token count and cost in native tooltip (title) when hovering over compact metrics (e.g. 1.5B, 131.5K, 6.9M) in the Usage Analytics dashboard.

Changes

  • src/shared/components/analytics/charts.tsx:
    • Added optional tooltip prop to StatCard and CompactStatGrid item definitions (falling back to value).
    • Added full formatted number tooltips (fmtFull) to token counts across ApiKeyTable, ProviderTable, and MostActiveDay7d.
  • src/shared/components/UsageAnalytics.tsx:
    • Passed exact full numbers (fmtFull) as tooltips to primary KPI cards (totalTokens, promptTokens, completionTokens, estCost) and performance secondary metrics (avgTokensPerReq, costPerReq, fastRequests).
  • src/shared/components/analytics/ModelTable.tsx:
    • Added full formatted token count tooltips to input, output, and total token cells in the model breakdown table.
  • src/shared/components/analytics/RequestCountTable.tsx:
    • Added full formatted token count tooltip to total token cells.
  • tests/unit/ui/analytics-token-hover-tooltip.test.tsx:
    • Added unit test suite covering tooltips in StatCard, CompactStatGrid, ApiKeyTable, ProviderTable, ModelTable, and RequestCountTable.

🤖 Generated with Claude Code

…cards and tables

Co-Authored-By: Claude Code <noreply@anthropic.com>
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