Skip to content

improvement(insights): clarify unassigned usage and refresh usage charts - #9265

Merged
waleedlatif1 merged 2 commits into
stagingfrom
codex/insights-usage-charts
Oct 21, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
codex/insights-usage-charts

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Label usage without a workspace link as Unassigned usage and explain organization-level activity and permanently deleted workspaces in a hover/click disclosure. Align its values with the workspace rows.
  • Refresh usage charts with flat, softer colors, quieter gridlines, and readable axis intervals while preserving source color identities.
  • Add a daily credit heatmap below the chart for organization and workspace views. Load its 365-day history separately, with timezone-aware dates, exact values, and keyboard navigation.

Type of Change

  • Enhancement and bug fix

Testing

  • Root lint, type-check, check:audits, check:test-types, block-registry audit, and full test suite.
  • Focused billing/calendar tests and the EMCN test suite, including aggregation before rounding, paid sub-credit days, DST, leap years, midnight boundaries, and chart scales.
  • Browser verification of the actual chart components with fixture data: dark/light themes, 320px and 390px layouts, legend isolation, keyboard navigation, click disclosures, sub-credit heatmap cells, and the latency-axis zero baseline. The updated Insights guide compiles as MDX.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 21, 2026 3:08am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 19 files

Confidence score: 4/5

  • In bar-chart.tsx, latency charts show — instead of 0 at the baseline. Preserve a literal 0 for the zero tick.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/emcn/src/components/charts/bar-chart.tsx">

<violation number="1" location="packages/emcn/src/components/charts/bar-chart.tsx:130">
P2: The zero tick is passed through `formatBarValue` for `unit='latency'`, but `formatChartLatency(0)` returns `—`; latency bar charts therefore label the baseline as missing instead of `0`. Preserve a literal `0` for that tick.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread packages/emcn/src/components/charts/bar-chart.tsx Outdated
Comment thread apps/sim/lib/billing/core/usage-analytics.ts
@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues remain from this review.

Summary

This PR clarifies unassigned usage, refreshes chart colors and scales, and adds a separately loaded 365-day usage heatmap.

  • Workspace usage without a link now has a clearer label and explanation.
  • Insights shows daily usage for the last 365 days in a heatmap.
  • Insights charts use flat colors and clearer value scales.

Reviews (3) · Last reviewed commit: "fix(insights): preserve sub-credit activ..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 20 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/hooks/queries/organization-usage.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 20 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit c8e39fb into staging Oct 21, 2026
59 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/insights-usage-charts branch October 21, 2026 03:36

This branch was successfully deployed

1 active deployment
Preview — 9236aaaf Deployed Oct 21, 2026 by vercel[bot]
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