Repository navigation
feat(ledger): clickable column headers to sort leaderboard - #770
Merged
Merged
Conversation
Numeric column headers in LedgerTable now toggle the table's sort on click. First click on a header descends on its value, second click toggles to ascending. An up/down chevron next to the active header's label marks the direction; hover lifts ink-muted to ink so the headers read as interactive. Sortable columns: Name (A-Z), every customCols entry (per-index key), Value (when a panel tab is active), p50/p90/p99/Mean, Delta field, Success, and Slot delta p50 (when hasSlots). Trend and Number columns stay static. The default sort (sortKey null) preserves the exact prior comparator so OG renders, share cards, and snapshot tests keep matching. A non-null sortKey routes through a new pickSortValue helper instead. Missing values land at +/-Infinity so empty cells consistently sort to the bottom regardless of direction.
bakabhai993
pushed a commit
to bakabhai993/OpenChainBench
that referenced
this pull request
Sep 12, 2026
…e-columns feat(ledger): clickable column headers to sort leaderboard
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
LedgerTableare now clickable to re-sort the leaderboard.sortKey === null) preserves the EXACT prior comparator (pickValue+higherIsBetter) so OG renders, share cards, and existing snapshots keep matching. A non-null key routes through a newpickSortValuehelper.Notes
aria-sortlives on the<th>(ARIA spec compliance; eslint warned when it was on the button).+/-Infinityso empty cells consistently land at the bottom regardless of direction.ink-mutedtoinkto telegraph clickability; the chevron itself staysink-mutedso it reads as a direction marker, not as emphasis.Test plan
/benchmarks/hyperliquid-frontendsmatches main.Volumeheader on/benchmarks/hyperliquid-frontends-> rows re-sort desc on volume + chevron down appears.Volumeagain -> rows re-sort asc + chevron up.Name-> alphabetic Z->A then A->Z.Successand confirm ranks recompute (top row stays rank 01).Slot delta, confirm sort byp50 / p99works and rows without slot data sink to the bottom.pnpm typecheckclean (confirmed).pnpm lint src/components/ledger-table.tsxclean (confirmed).