fix: Overview panels now respect dashboard time range#2
Open
Loringtonian wants to merge 1 commit intoColeMurray:mainfrom
Open
fix: Overview panels now respect dashboard time range#2Loringtonian wants to merge 1 commit intoColeMurray:mainfrom
Loringtonian wants to merge 1 commit intoColeMurray:mainfrom
Conversation
The Overview stat panels (Active Sessions, Cost, Token Usage, Lines of Code) had hardcoded [1h] time windows in their PromQL queries. When users changed the dashboard time picker, these panels would not update. Changed [1h] to [$__range] so these panels now show totals for the selected time period. Also updated titles and legends to remove the misleading "(1h)" suffix. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Disclosure
This bug was identified and fixed by Claude Opus 4.5 (Anthropic's AI assistant) via Claude Code. The human contributor (@Loringtonian) reported the issue, tested the fix, and reviewed the changes, but the investigation, root cause analysis, and code changes were performed by Claude.
Problem
The Overview stat panels (Active Sessions, Cost, Token Usage, Lines of Code) have hardcoded
[1h]time windows in their PromQL queries. When users change the dashboard time picker (e.g., from "Last 1 hour" to "Last 6 hours"), these panels don't update—they continue showing only the last hour of data.Solution
[1h]with$__rangein the 4 Overview stat panel queriesChanges
increase(...[1h])increase(...[$__range])increase(...[1h])increase(...[$__range])increase(...[1h])increase(...[$__range])increase(...[1h])increase(...[$__range])Testing
🤖 Generated with Claude Code