Fix filtered dashboard durations - #1685
Merged
Merged
Conversation
This was referenced Sep 6, 2026
Contributor
Greptile SummaryThis PR corrects filtered dashboard durations by attributing each heartbeat’s capped duration against the complete eligible timeline before applying dimension filters.
Confidence Score: 5/5The PR appears safe to merge with no outstanding correctness or repository-rule issues. The filtered dashboard now derives durations from the complete eligible timeline before filtering, and the revised public-behavior tests correctly cover both adaptive query paths. The previous implementation-detail test finding was manually resolved and is not outstanding. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Eligible heartbeat timeline] --> B{Filtered matches ≤ 1000?}
B -->|Yes| C[Indexed predecessor lookup]
B -->|No| D[Window attribution over full timeline]
C --> E[Apply dashboard filters]
D --> E
E --> F[Materialized filtered rows]
F --> G[Totals and grouped dimensions]
F --> H[Weekly projects]
F --> I[Coding rhythm]
Reviews (4): Last reviewed commit: "Fix filtered dashboard durations" | Re-trigger Greptile |
skyfallwastaken
force-pushed
the
fix-filtered-dashboard-durations
branch
2 times, most recently
from
September 6, 2026 12:07
ddc3bb6 to
55acadb
Compare
skyfallwastaken
force-pushed
the
fix-filtered-dashboard-durations
branch
from
September 6, 2026 12:13
55acadb to
797f7d2
Compare
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.
Summary of the problem
Dashboard dimension filters were applied before duration attribution. Gaps between unrelated matching heartbeats could therefore add up to 120 seconds each and substantially inflate filtered coding time.
Describe your changes
Calculate capped current-row durations from the complete eligible timeline before applying language, project, editor, operating system or category filters. Use the same attribution for totals, grouped dimensions, weekly projects and coding rhythm, then version the cached result.
This is PR 2 of 3 in a stacked change. It depends on #1684 and is followed by #1686.
Screenshots / Media
Not applicable. This corrects calculated values without changing the interface.