fix(miner-details): make filter button counts respect search query#1115
Open
plind-junior wants to merge 3 commits into
Open
fix(miner-details): make filter button counts respect search query#1115plind-junior wants to merge 3 commits into
plind-junior wants to merge 3 commits into
Conversation
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
Filter button counts on the Miner Details page now update live as the user types in the search box. Previously the All/Open/Merged/Closed (PR tab) and All/Open/Solved/Closed (Open Issues tab) counts were computed from the full unfiltered dataset, so users saw stale numbers like "Open (42)" even when the visible list had shrunk to one row.
Fixes the bug described in the linked issue.
Fixes #1114
Changes
src/components/miners/MinerPRsTable.tsxScope the count computation to the same
search + authorfilters that drive the visible table, withstatusFilter: 'all'so the active button doesn't zero out the others.
ts const statusCounts = useMemo(() => { if (!prs) return { all: 0, open: 0, merged: 0, closed: 0 }; const scope = filterPrs(prs, { author: selectedAuthor, includeNumber: true, searchQuery, statusFilter: 'all', }); return getPrStatusCounts(scope); }, [prs, selectedAuthor, searchQuery]); src/components/miners/MinerOpenDiscoveryIssuesByRepo.tsxapplyIssueFilterinto a reusableapplyIssueSearchhelper.mineCountsandotherCountsnow run throughapplyIssueSearchwith each section's own search query (mineSearch/otherSearch), so the two sections' filter buttons update independently.How counts behave now
Each button shows the number of rows that would be selected if you clicked it under the current search/author scope.
Test plan
/miners/details?githubId=…→ Pull Requests tab.npm run type-checkpasses.Notes
filterPrsand refactors a small inline filter intoapplyIssueSearch.Screencast.from.2026-05-13.22-35-26.mp4