improvement(insights): serve org usage from settled segments and redesign the overview - #8193
Conversation
…sign the overview
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
There was a problem hiding this comment.
All reported issues were addressed across 42 files
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Fix all with cubic | Re-trigger cubic
…able segments, neutral zero delta
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 42 files
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Fix all with cubic | Re-trigger cubic
…tale legend highlights
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 42 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 42 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
No issues found across 42 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
Summary
usage-segment-cache: window cut at the viewer's midnights, settled days cached whole, recent days cached hour by hour, adjacent misses merged into one scan, cache failures fall back to a ledger read, writes are fire-and-forgetGET /usage/overviewreplaces the summary + source breakdown + full org billing calls the overview made (the billing call re-summed the whole reporting year per member just to show the allowance)readUsageGroupsis the single entry point for rankings; the public v2 API keeps its bounded direct read; overview members reuse the Members tab pipeline; allowance comes fromgetOrgUsageLimitBarChartgains a stacked mode (discriminated props) that draws each column as one bar split by color, date-only tooltips for calendar buckets with exact values, memoized data table;DonutChartremoved (no consumers left)text[]arrived unparsed with type fetching off)Measured on the prod replica for a large org, 30-day window, repeat view: credits 6.6s cold / 1.27s warm → 0.13s, model ranking 11.9s → 0.05s, activity 8.6s → 0.8s. Locally, the overview request goes 565ms cold → 93ms cached.
Type of Change
Testing
check:audits(47), lint, block registry, docs manifest all passChecklist