Skip to content

fix(watchlist): populate Resolved and Closed filters on Issues tab#1177

Open
blinkeye-lcm wants to merge 1 commit into
entrius:testfrom
blinkeye-lcm:fix/watchlist-issues-mirror-since
Open

fix(watchlist): populate Resolved and Closed filters on Issues tab#1177
blinkeye-lcm wants to merge 1 commit into
entrius:testfrom
blinkeye-lcm:fix/watchlist-issues-mirror-since

Conversation

@blinkeye-lcm
Copy link
Copy Markdown
Contributor

@blinkeye-lcm blinkeye-lcm commented May 14, 2026

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.tsx was calling useMinersIssues(minerIds, minerIds.length > 0) without a since argument, and the mirror's /miners/<id>/issues endpoint returns only currently OPEN rows when since is omitted (it does not default to a recent window, despite what the hook's JSDoc previously claimed). With no closed rows reaching issueState(), 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 in MinerApi.ts keeps the gotcha and its workaround in one place, and module-level pinning keeps the React Query cache key stable across renders without a useMemo. The misleading JSDoc on useMinersIssues is 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

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

Screenshots

Before: Resolved and Closed chips read 0 for every watched miner; clicking either filter shows an empty list.
before1

After: chip counts reflect real state distribution, and the Resolved view matches what the per-miner Issue Discovery surface already shows.
after1

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 14, 2026
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.

Watchlist → Issues tab silently hides every closed/resolved issue (mirror /miners/:id/issues without since)

1 participant