Summary
The Miner Details open-discovery section scans repositories from a miner’s PR activity. The scan helper first de-duplicates PRs by repository and then caps the repository list to the fetch limit.
However, the UI warning that explains this cap is shown using the raw PR count:
prs.length > repoFetchLimit
This makes the warning appear for miners who have more than 50 PRs but fewer than 50 unique repositories.
For example, a miner with 60 PRs across only 2 repositories can see a warning saying they have PRs in more than 50 repositories, even though only 2 repositories are involved.
Expected Behavior
The warning should appear only when the miner has more than repoFetchLimit unique repositories that could be scanned.
Current Behavior
The warning appears when the miner has more than repoFetchLimit PRs, regardless of how many unique repositories those PRs belong to.
Relevant Code
selectMinerIssueScanRepos() de-duplicates PRs by repository before applying the cap in src/hooks/useMinerRepositoriesOpenIssues.ts.
MinerOpenDiscoveryIssuesByRepo shows the warning based on prs.length in src/components/miners/MinerOpenDiscoveryIssuesByRepo.tsx.
Suggested Fix
Track the uncapped unique repository count and use that value for the warning condition.
Add a regression test covering:
- More than 50 PRs across fewer than 50 repositories should not show the warning.
- More than 50 unique repositories should show the warning.
- The displayed warning text should refer to repositories, not PR count.
Summary
The Miner Details open-discovery section scans repositories from a miner’s PR activity. The scan helper first de-duplicates PRs by repository and then caps the repository list to the fetch limit.
However, the UI warning that explains this cap is shown using the raw PR count:
This makes the warning appear for miners who have more than 50 PRs but fewer than 50 unique repositories.
For example, a miner with 60 PRs across only 2 repositories can see a warning saying they have PRs in more than 50 repositories, even though only 2 repositories are involved.
Expected Behavior
The warning should appear only when the miner has more than
repoFetchLimitunique repositories that could be scanned.Current Behavior
The warning appears when the miner has more than
repoFetchLimitPRs, regardless of how many unique repositories those PRs belong to.Relevant Code
selectMinerIssueScanRepos()de-duplicates PRs by repository before applying the cap insrc/hooks/useMinerRepositoriesOpenIssues.ts.MinerOpenDiscoveryIssuesByReposhows the warning based onprs.lengthinsrc/components/miners/MinerOpenDiscoveryIssuesByRepo.tsx.Suggested Fix
Track the uncapped unique repository count and use that value for the warning condition.
Add a regression test covering: