Skip to content

feat: add the AI spend top spenders card - #32342

Merged
ssncferreira merged 2 commits into
ssncf/ai-spend-trends-chartfrom
ssncf/ai-spend-top-spenders
Nov 20, 2026
Merged

ssncferreira merged 2 commits into
ssncf/ai-spend-trends-chartfrom
ssncf/ai-spend-top-spenders

Conversation

@ssncferreira

@ssncferreira ssncferreira commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds the Top spenders card to the AI spend Overview tab, with the top 10 users by spend.

Changes

  • Add TopSpendersCard, with a summary of how much the listed users spent compared with everyone else, for example "Top 10 users spent 91% of the total. The other 34 users spent $2,693.00."
  • Keep Detailed report disabled with a TODO(AIGOV-731).
  • Add a menu per user with User AI session logs, which opens the sessions page filtered to that user and period. The sessions page needs read access to every user's sessions, so the menu is hidden without it.
  • Add tests for the summary and the session logs link, and stories for the card states.

Related to AIGOV-732

Note

Generated by Coder Agents on behalf of @ssncferreira.

@linear-code

linear-code Bot commented Nov 17, 2026

Copy link
Copy Markdown

AIGOV-732

@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from db3a548 to 6619148 Compare November 18, 2026 08:26
@ssncferreira ssncferreira changed the title feat(site/src/pages/AISettingsPage/AISpendPage): add the AI spend top spenders card feat: add the AI spend top spenders card Nov 18, 2026
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 6619148 to 030aa2c Compare November 18, 2026 09:08
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 030aa2c to bc5da43 Compare November 18, 2026 09:19
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from bc5da43 to 24ab485 Compare November 18, 2026 09:50
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 24ab485 to 4cc3870 Compare November 18, 2026 14:06
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 4cc3870 to 8fb066c Compare November 18, 2026 15:08
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 8fb066c to 7ab765f Compare November 18, 2026 15:14
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 7ab765f to dec030b Compare November 18, 2026 15:41
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from dec030b to ea568d0 Compare November 19, 2026 17:03
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from ea568d0 to 637dfc2 Compare November 19, 2026 17:05
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 637dfc2 to 04fc30a Compare November 19, 2026 17:10
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 04fc30a to ffb286c Compare November 19, 2026 17:20
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from ffb286c to 0dc3a60 Compare November 19, 2026 17:46
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from acf5f48 to ef80c3a Compare November 19, 2026 18:26
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from ef80c3a to 7dae879 Compare November 19, 2026 18:30
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 7dae879 to f833259 Compare November 19, 2026 18:33
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from f833259 to 2e1eed5 Compare November 19, 2026 18:42
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 2e1eed5 to 3a9c34d Compare November 19, 2026 18:46
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 3a9c34d to 481efab Compare November 19, 2026 18:50
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 481efab to 6b86a26 Compare November 19, 2026 18:54
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 6b86a26 to fa75f4a Compare November 19, 2026 18:55
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from fa75f4a to f1f099f Compare November 20, 2026 09:05
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from f1f099f to 66c9a06 Compare November 20, 2026 10:49
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 66c9a06 to 838a5a1 Compare November 20, 2026 11:04
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 838a5a1 to 36b93eb Compare November 20, 2026 11:15
@ssncferreira
ssncferreira force-pushed the ssncf/ai-spend-top-spenders branch from 36b93eb to 842898d Compare November 20, 2026 11:26
Comment on lines +15 to +17
}: Pick<OrganizationAISpendOverview, "count" | "totals" | "users">):
| string
| undefined => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh this is such an unfortunate output, this is so hard to read 😂

This branch had an error being deployed

1 failed deployment
docs-preview — 042f015d Deployed Nov 20, 2026 by ssncferreira via cleanup #293
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.

3 participants