Skip to content

fix: show in-view rank indicator when leaderboard filters are active (#1102)#1174

Open
alpurkan17 wants to merge 1 commit into
entrius:mainfrom
alpurkan17:fix/1102-rank-in-view
Open

fix: show in-view rank indicator when leaderboard filters are active (#1102)#1174
alpurkan17 wants to merge 1 commit into
entrius:mainfrom
alpurkan17:fix/1102-rank-in-view

Conversation

@alpurkan17
Copy link
Copy Markdown

Summary

The Rank column on Top Miners / Discoveries leaderboards always shows the global rank. When a filter is active, consecutive rows show gaps (16, 19, 23, 48, 94) with no UI indication that the gaps are caused by filtered-out miners. Users reasonably interpret this as a bug.

Fix (Option A): add a subtle "·N in view" indicator next to the global rank when filters are active and the two ranks diverge.

Changes

  • types.ts: add viewRank to MinerStats — 1-indexed position in filtered subset
  • TopMinersTable.tsx: compute viewRank only when a search/eligibility filter is active
  • MinersList.tsx: show ·{viewRank} beside the RankIcon in list view
  • MinerCard.tsx: show ·{viewRank} in view next to the global rank on cards

Edge cases

  • No filter active → no indicator shown
  • First row (rank=viewRank=1) → no indicator shown
  • Pure search filter → indicator shown for mismatched rows
  • Both search + eligibility → indicator shown correctly
  • No backend changes — computed entirely in frontend

Validation

  • 4 files, +52/−6, no new dependencies
  • Null-guarded: viewRank != null before comparison
  • Both card view and list view covered

Closes #1102

…ntrius#1102)

Add viewRank field to MinerStats — computed as the 1-indexed position
within the filtered subset when a search or eligibility filter is active.
MinersList rank cell and MinerCard rank line now display a subtle
"·N in view" indicator beside the global rank when the two diverge.
@xiao-xiao-mao xiao-xiao-mao Bot added the enhancement New feature or request label May 14, 2026
@alpurkan17
Copy link
Copy Markdown
Author

@anderdc @LandynDev ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant