feat: add Issue Discovery mode toggle to leaderboard#246
feat: add Issue Discovery mode toggle to leaderboard#246edwin-rivera-dev wants to merge 3 commits intoentrius:testfrom
Conversation
|
Hi @spider-yamet @anderdc Approach: added a tab toggle at the top of Scope kept tight: one file ( Acceptance criteria coverage:
Happy to split this into smaller increments or to also fold the shared field mapping into a hook in the same PR if that fits your conventions better - just let me know. |
|
conflicts |
Summary
The leaderboard can now surface Issue Discovery rankings as a section inside the existing miner leaderboard, rather than requiring users to navigate to a parallel
/discoveriespage.What changed
src/pages/TopMinersPage.tsxgains amodetoggle (Tabs component) with two values:totalScoreissueDiscoveryScore, usesissueCredibility,isIssueEligible,totalSolvedIssues/totalOpenIssues/totalClosedIssuesWhen the Discovery mode is active:
TopMinersTablereceives the discovery-mapped dataset andactivityLabel="Issues"/discoveries/detailswith a "Back to Discoveries" back labelLeaderboardSidebarrenders withvariant="discoveries"State is mirrored to
?mode=discoveryviauseSearchParamsso the tab is deep-linkable and preserved on refresh / back-navigation.Why this scope
TopMinersTable/LeaderboardSidebarwithout modification - the props already support both modes (the existingDiscoveriesPageis effectively the same page with different field mappings)useAllMiners()hook/discoveriesand/discoveries/detailsroutes are untouched for backward compatibility; deep links from elsewhere in the app keep workingType of Change
Testing
npm run buildnpm run lint:fix/top-miners:totalScore?mode=discovery/discoveries/details?githubId=...?mode=discovery(not OSS)?mode=ossor no param --> OSS mode; invalid values --> OSS modeChecklist
src/pages/TopMinersPage.tsxtouched/discoveriespage behavior preservedFollow-ups (out of scope for this PR)
useLeaderboardMiners(mode)hook once DiscoveriesPage is consolidated/discoveriesshould redirect to/top-miners?mode=discoveryor remain as a deep-linkable entry pointUpdated UI Video
14.04.2026_17.55.21_REC.mp4
Closes #171