fix(bounties): consolidate issues queries and stop loading flash#979
Open
cleanjunc wants to merge 2 commits intoentrius:testfrom
Open
fix(bounties): consolidate issues queries and stop loading flash#979cleanjunc wants to merge 2 commits intoentrius:testfrom
cleanjunc wants to merge 2 commits intoentrius:testfrom
Conversation
Contributor
Author
|
@anderdc @e35ventura Could you please review this PR? Thanks! |
Collaborator
|
Fix conflicts. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Bounties page used to fire three separate
useIssuesrequests (active,registered,completed,cancelled) and stitch the responses together. Two problems came out of that shape:isLoadingwas 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.useMemokept 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.IssuesListalready 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 byWatchlistPage,useDashboardData, andMinerRepositoriesTable, 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
Screenshots
Not applicable. No visual change beyond the eliminated skeleton flash on cold load.
Checklist
npm run formatandnpm run lint:fixhave been runnpm run buildpasses