fix(consensus): apply selected time range to daily overview charts - #443
Merged
Conversation
The consensus overview daily queries (30d, 90d, 180d, 1y, 2y) fetched the full history with day_start_date_like='20%' and page_size=10000 and never trimmed the result, so every daily range rendered identically to "all". The daily API endpoints expose no range filter on their primary key, so the window is now applied client-side after fetch via a cutoff date derived from the range's day count. The "all" window (null days) is unaffected. Claude-Session: https://claude.ai/code/session_01Mp4aKNXPmN6NfMuNGbf3Qm
samcm
force-pushed
the
fix/consensus-overview-daily-range
branch
from
July 13, 2026 05:40
6de562f to
1646cd1
Compare
samcm
marked this pull request as ready for review
July 13, 2026 05:44
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.
On the consensus overview page, every daily time range (30d, 90d, 180d, 1y, 2y) rendered identically to "All" because the daily queries fetch the full history (
day_start_date_like: '20%',page_size: 10000) and nothing trimmed the result —startTimestampwas only applied to the hourly queries, and the daily endpoints have no server-side range filter on theirday_start_dateprimary key. This trims daily records to the selected window client-side after fetch via two unit-tested pure helpers; the "All" window and the execution overview page (already bounded per-range) are unaffected.