feat(insights): add cost breakdown by role#2970
Conversation
Add a group_by=role mode to the searchUsers telemetry endpoint so orgs can view cost aggregated by RBAC role instead of individual employees. The backend fetches per-user costs from ClickHouse, joins with role assignments from Postgres, and returns role-level aggregates. The frontend gains an Employee/Role toggle on the cost table that lazy-loads role data when activated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
# Conflicts: # client/sdk/.speakeasy/gen.lock # server/gen/http/openapi3.json
🚀 Preview Environment (PR #2970)Preview URL: https://pr-2970.dev.getgram.ai
Gram Preview Bot |
…gregation Fetch ClickHouse per-user costs and Postgres role assignments concurrently via errgroup. Aggregate directly into the response type to eliminate an intermediate struct and extra iteration pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # client/sdk/.speakeasy/gen.lock # server/gen/http/openapi3.json
|
@claude review |
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, comment @claude review on this pull request to trigger a review.
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
1 similar comment
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
Summary
group_by=roleparameter to thesearchUserstelemetry endpoint that aggregates per-user costs by RBAC roleTest plan
🤖 Generated with Claude Code