Skip to content

fix: prevent double-counting PRs in dashboard overview pool#1199

Closed
zp6 wants to merge 2 commits into
entrius:testfrom
zp6:fix/dashboard-pr-overview-double-count
Closed

fix: prevent double-counting PRs in dashboard overview pool#1199
zp6 wants to merge 2 commits into
entrius:testfrom
zp6:fix/dashboard-pr-overview-double-count

Conversation

@zp6
Copy link
Copy Markdown

@zp6 zp6 commented May 15, 2026

Fixes #1180

getPrOverviewMetrics ran three independent if branches for createdInWindow / mergedInWindow / closedInWindow. A PR created and merged in the same window counted as both Open and Merged (+2 to Total).

Fix: Changed to if / else if chain so each PR contributes to exactly one bucket. Merged takes priority (terminal state), then Closed, then Open.

Result: Total === Merged + Open + Closed for all windows.

zp6 added 2 commits May 16, 2026 03:02
Fixes entrius#1176

The Watchlist Issues tab was passing useMinersIssues without a since
parameter, causing the mirror API to return only OPEN issues. Resolved
and Closed filters always showed 0 results.

Added a stable since timestamp (35 days back, memoized) so the mirror
returns issues across all states. Same pattern used by the dashboard.
Fixes entrius#1180

getPrOverviewMetrics ran three independent if-branches for
createdInWindow / mergedInWindow / closedInWindow, so a PR created and
merged in the same window counted as both Open and Merged (+2 Total).

Changed to if/else-if chain so each PR contributes to exactly one
bucket: Merged takes priority (terminal state), then Closed, then Open.
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 15, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 15, 2026

Duplicate of #1181 which is better scoped/implemented. Closing.

@anderdc anderdc closed this May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard PR Overview pool double-counts PRs and inflates the "Open" tile

2 participants