Skip to content

fix(bounties): consolidate issues queries and stop loading flash#979

Open
cleanjunc wants to merge 2 commits intoentrius:testfrom
cleanjunc:fix/bounties-issues-query
Open

fix(bounties): consolidate issues queries and stop loading flash#979
cleanjunc wants to merge 2 commits intoentrius:testfrom
cleanjunc:fix/bounties-issues-query

Conversation

@cleanjunc
Copy link
Copy Markdown
Contributor

Summary

The Bounties page used to fire three separate useIssues requests (active, registered, completed,cancelled) and stitch the responses together. Two problems came out of that shape:

  • isLoading was AND-ed across the three queries, so the skeleton vanished as soon as the first response landed and the remaining buckets popped in afterward. On a cold cache the page repainted twice.
  • The manual dedupe in useMemo kept the first-seen copy of an issue. Around status transitions the same issue can briefly appear in two responses, so a stale row could win over a newer one.

This PR collapses the three calls into a single useIssues() and removes the bespoke merge. IssuesList already slices the response by tab (active / registered / completed | cancelled), so no consumer changes are needed. The unfiltered cache key is the same one already populated by WatchlistPage, useDashboardData, and MinerRepositoriesTable, so navigation between those pages now lands on a warm cache.

Net effect: one request instead of three, a clean skeleton-to-data transition with no flash, and the rows always reflect the latest payload from the API.

Related Issues

Fixes #978

Type of Change

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

Screenshots

Not applicable. No visual change beyond the eliminated skeleton flash on cold load.

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 7, 2026
@cleanjunc
Copy link
Copy Markdown
Contributor Author

@anderdc @e35ventura Could you please review this PR? Thanks!

@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 9, 2026

Fix conflicts.

@cleanjunc
Copy link
Copy Markdown
Contributor Author

cleanjunc commented May 9, 2026

Hi @anderdc
I've fixed the conflicts. But src/components/leaderboard/ActivitySidebarCards.tsx is not related to this PR, the bug is from the just merged PR #762.
Could you please review again?
Thank you!

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.

[Bug] Bounties page fires three useIssues queries and shows partial data while two of them are still loading

2 participants