Skip to content

fix(miners): filter open discovery issues to gittensor tracked repos#966

Open
cleanjunc wants to merge 1 commit intoentrius:testfrom
cleanjunc:fix/miner-discovery-tracked-repos
Open

fix(miners): filter open discovery issues to gittensor tracked repos#966
cleanjunc wants to merge 1 commit intoentrius:testfrom
cleanjunc:fix/miner-discovery-tracked-repos

Conversation

@cleanjunc
Copy link
Copy Markdown
Contributor

Summary

The miner discovery issues page was rendering items from repositories outside the gittensor tracked set, because fetchGithubIssuesByAuthor in MinerOpenDiscoveryIssuesByRepo.tsx queries api.github.com/search/issues directly and the result was never intersected with the allowlist.

This change introduces a small reusable hook, useTrackedRepoSet, that returns a memoized lowercase set built from GET /dash/repos (the same source the /repositories page already uses). The discovery component reads the set, gates the GitHub search query on it, and passes it into the fetcher so the filter runs before the per issue timeline enrichment fan out. Everything downstream (authoredRepos, the secondary issues fetch, and the grouping logic) becomes correct without any further changes.

Notable effects:

  • Untracked repositories no longer appear in the "Your open discovery issues" or "Other open discovery issues" sections.
  • Up to 100 unnecessary GitHub timeline requests per page load are avoided, easing the unauthenticated rate limit pressure.
  • The new hook is generic and can be reused anywhere external data needs to be narrowed to gittensor tracked repositories.

Related Issues

Fixes #965

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Screenshots

Before: untracked repositories listed in the discovery issues sections.
before

After: only repositories present in GET /dash/repos are shown.
after

Checklist

  • New components are modularized/separated where sensible
  • Uses predefined theme (e.g. no hardcoded colors)
  • Responsive/mobile checked
  • Tested against the test API
  • npm run format and npm run lint:fix have been run
  • npm run build passes
  • Screenshots included for any UI/visual changes

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 6, 2026
@cleanjunc
Copy link
Copy Markdown
Contributor Author

@anderdc Could you please review this PR? Thanks!

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.

Open issues tab shows results from untracked repositories

1 participant