fix(watchlist): populate Resolved and Closed filters on Issues tab#1177
Open
blinkeye-lcm wants to merge 1 commit into
Open
fix(watchlist): populate Resolved and Closed filters on Issues tab#1177blinkeye-lcm wants to merge 1 commit into
blinkeye-lcm wants to merge 1 commit into
Conversation
…d filters populate
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 Watchlist Issues tab kept rendering an empty list under the Resolved and Closed filters, with both chip counts pinned at zero. Root cause is the same gotcha #1126 documented for the dashboard:
WatchlistPage.tsxwas callinguseMinersIssues(minerIds, minerIds.length > 0)without asinceargument, and the mirror's/miners/<id>/issuesendpoint returns only currently OPEN rows whensinceis omitted (it does not default to a recent window, despite what the hook's JSDoc previously claimed). With no closed rows reachingissueState(), the Resolved and Closed buckets stayed empty for every watched miner.The fix passes a pinned subnet-launch cutoff to
useMinersIssues. Co-locating the constant with the hook inMinerApi.tskeeps the gotcha and its workaround in one place, and module-level pinning keeps the React Query cache key stable across renders without auseMemo. The misleading JSDoc onuseMinersIssuesis corrected to flag the OPEN-only behaviour.Scope is intentionally narrow: two files touched, one new exported constant, no behavioural changes outside the Issues tab.
Open question
After this fix, the filter chips and the “Issue Activity” sidebar show different counts.
The chips display: Solved 70 / Open 5 / Closed 16, while the sidebar shows: Solved 55 / Open 15 / Closed 15.
From what I can see, the chip counts are based directly on the table rows, while the sidebar totals are calculated from the scoring stats returned by /miners. I also noticed the same discrepancy on the dashboard after #1134.
Do you think it’s worth reconciling these two data sources so the numbers stay consistent, or is it acceptable to leave them as they are?
Related Issues
Fixes #1176
Type of Change
Screenshots
Before: Resolved and Closed chips read

0for every watched miner; clicking either filter shows an empty list.After: chip counts reflect real state distribution, and the Resolved view matches what the per-miner Issue Discovery surface already shows.

Checklist
npm run formatandnpm run lint:fixhave been runnpm run buildpasses