fix(miner): repo standing counts match PR table active rows#1309
fix(miner): repo standing counts match PR table active rows#1309carlh7777 wants to merge 3 commits into
Conversation
|
Fix conflicts. |
|
@anderdc resolved conflicts, could you review again? |
anderdc
left a comment
There was a problem hiding this comment.
The core fix is right, but ExplorerUtils.ts changes the defaults of isOutsideScoringWindow and getScoringWindowStartIso from 35 to DEFAULT_PR_LOOKBACK_DAYS (30). Those two are still called with no argument from WatchlistPage (PR + issue staleness), IssuesList, and MinerOpenDiscoveryIssuesByRepo — including the getScoringWindowStartIso() since-filter at line 97 that controls which discovery issues get fetched. So this silently narrows the window by 5 days on surfaces unrelated to #1308. The PR-table fix already routes through the new isOutsidePrLookbackWindow / per-repo map, so these defaults don't need to change — keep both at 35.
|
@anderdc, fixed. could you review again? |
Summary
On the miner details page, per-repository standing cards display Merged and Closed PR counts from the API (
totalMergedPrs,totalClosedPrs). These counts are calculated using each repository's configuredscoring.pr_lookback_dayswindow (default 30 days via gittensor'sPR_LOOKBACK_DAYS, with repository-specific overrides supported).The Pull Requests table previously used a fixed 35-day staleness window when determining whether merged PRs should appear active or dimmed. As a result, repositories with shorter lookback windows could display merged PRs as active in the table even though they were already excluded from standing counts, leading to inconsistencies between the table and repository standings.
This change aligns PR table staleness styling with repository-specific scoring windows by:
pr_lookback_daysfrom repository configuration (/dash/repos)MinerPRsTablePR activity · {n}d lookback)This ensures repository standing counts and Pull Requests table highlighting are derived from the same scoring window logic.
Related Issues
Fixes #1308
Type of Change
Screenshots
Before
After
Checklist
npm run formatandnpm run lint:fixhave been runnpm run buildpasses