feat(web): Chart usage by hour for ranges up to 7 days - #124
Merged
Merged
Conversation
Today rendered a single dot and short ranges drew a straight line between daily points. The usage query now returns local hourly buckets and the chart uses them for ranges of 7 days or less, with day dividers and a dashed segment for the still-accumulating current hour.
|
4ndreello
marked this pull request as ready for review
September 25, 2026 02:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Chart usage by hour when the range is 7 days or less, so Today and Last 3/7 days show a real curve.
Today used to render a single dot with a "pick a longer range" caption, and 3-day ranges drew a straight line between three daily points. The usage query now also returns
byHour(local-time buckets keyedYYYY-MM-DD HH), and the page picks hourly rows for short ranges and daily rows beyond 7 days.In the hourly chart:
· partial, to avoid reading a drop that did not happenThe KPI sparklines use the same rows, so on Today they show the day's curve instead of a flat line.
byHouris optional in the protocol: a web page talking to an older daemon falls back to the daily chart.Worth knowing when reviewing: spend is bucketed by the session's
created_at, so backfilled sessions can pile up at 00h. That was already true for daily buckets and is just more visible per hour.