stablyai / stablyai/orca

Stats heatmap shows active days as idle: linear scale to the best day, and a 42-cell grid fed by 30 days of data

Open
#20,193 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
72.1k
Forks
4.7k
Avg merge
14h 54m
Merged PRs (30d)
520

Description

## Describe the bug

The "Daily intensity" heatmap on Stats & Usage shows active days as idle for two independent reasons:

1. **Linear scale against the single best day.** `buildDailyOverview` buckets `totalTokens / maxTokens` at 25/50/75%. With Claude, Codex, and OpenCode combined, the best day is a multi-billion-token Codex day, so a 700M-token OpenCode day is under 25% and lands on the faintest level, which in the dark theme is barely distinguishable from an idle cell. On my profile 30 of 33 active days in the last six weeks rendered at level 1.
2. **42 cells fed by 30 days of data.** `UsageOverviewPane` draws `RECENT_DAY_COUNT = 42` days but reads each provider's `daily` series from the tab slices, whose range defaults to `30d`. The first twelve cells therefore always render as idle regardless of activity.

Reproduced cell-for-cell from the on-disk usage snapshots: with the default filters exactly 23 of 42 days light up on my machine; every one of the 42 days has activity.

## Steps to reproduce

1. Use more than one provider with very different daily volumes (e.g. Codex days in the billions of tokens, OpenCode days in the hundreds of millions).
2. Open Stats & Usage → Overview with the default filters.
3. Compare the heatmap against the per-provider daily charts for the same days.

## Expected behavior

Every day with activity renders visibly, shades reflect where a day sits among your own active days, and every cell the grid draws is backed by fetched data.

## Environment

Orca 1.4.197, macOS 26.3 (Apple Silicon).

Contributor guide

Open the contributing guide

Research direction

Start with `UsageOverviewPane` and `buildDailyOverview`, then trace how the provider tab slices request their `daily` series and how `RECENT_DAY_COUNT` is used. Reproduce the 42-cell view with the default filters and compare it with the provider charts. Done means all drawn cells have fetched data and active days are visibly distinguished with shading based on the user's active-day distribution.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.