Skip to content

fix(dashboard): draw sampled 7d/30d charts as continuous lines - #157

Merged
prakersh merged 1 commit into
mainfrom
fix/chart-sampled-gaps
Oct 22, 2026
Merged

prakersh merged 1 commit into
mainfrom
fix/chart-sampled-gaps

Conversation

@prakersh

Copy link
Copy Markdown
Contributor

Summary

  • Since Menubar never blank, Cursor string numbers (#151), Codex reset credits (#152) #153, 7d and 30d history arrives sampled to about 200 points. Their normal spacing (about 50 minutes at 7d, 3.6 hours at 30d) exceeded the poll-based gap threshold, so every segment was drawn as a faded dashed gap with point dots, for every provider.
  • The gap threshold is now the larger of the poll-based value and three times the series' median spacing. Sampled ranges draw as continuous lines, and a real outage (for example a day without data) is still shown as a gap.
  • Metadata fields prefixed with an underscore (Anthropic history's _source) are no longer plotted as a series.
  • Per-model Anthropic weekly buckets are labelled by name in chart legends ("Weekly Fable" instead of seven_day_scoped_fable).

Test plan

  • New node-driven test: evenly sampled 7d/30d series have no gap segments and no interior dots, a day-long outage is still one gap, _source is not a series, and the Fable label resolves
  • Related web tests (history, chart, peak, window) pass under race
  • Visual check of the Anthropic 7d and 30d charts

Long ranges arrive sampled to about 200 points, so their normal spacing
(about 50 minutes at 7d, 3.6 hours at 30d) exceeded the poll-based gap
threshold and every segment was drawn as a dashed gap with point dots.
Scale the threshold to three times the series' median spacing, keep
metadata fields such as Anthropic's _source out of the series, and label
per-model weekly buckets (Weekly Fable) in chart legends.
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@prakersh
prakersh merged commit 114e0ed into main Oct 22, 2026
24 checks passed
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