Skip to content

Miners leaderboard — sort by GitHub username (Name) #1216

@andriypolanski

Description

@andriypolanski

Summary

Adds a username sort option to the miners leaderboard so miners can be ordered alphabetically by GitHub login. The behavior mirrors the Repository column on TopRepositoriesTable: same localeCompare, same ascending default when the sort is first selected, and the same toolbar / list-header treatment so the two list-style leaderboards feel consistent.

Motivation

Score, earnings, PR/issue counts, and credibility are the primary ranking axes, but users often need to find a specific miner by name or scan the roster in alphabetical order—especially on long lists (/top-miners, /discoveries, watchlist). Without a name sort, the only option was search or manual scrolling while sorted by score.

Scope

Surface Change
OSS leaderboard Name sort available
Discoveries leaderboard Name sort available
Watchlist (miners) Name sort available
List + card views Both wired
URL sort=username, optional dir

Out of scope: changing default sort (still Score / totalScore); async GitHub profile fetches for sort (static roster fields only, same as list render before login hydration).

Technical notes

  • SortOption extended with 'username'.
  • compareMiners adds minerSortName(a).localeCompare(minerSortName(b)).
  • defaultOrderOverrides: { username: 'asc' } on useDataTableParams (matches repositories’ repository: 'asc').
  • minerSortName exported from components/leaderboard/index.ts for reuse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions