Skip to content

feat(web): make Topic leaderboard columns sortable - #620

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:feature/topics-leaderboard-sortable-columns
Aug 3, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
d180:feature/topics-leaderboard-sortable-columns

Conversation

@d180

@d180 d180 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The Topic leaderboard was hard-sorted by visibility descending with no way to sort by prompts, mentions, citations, SoV, or last run — every header was a plain <TableHead>.
  • Adds a SortableHead component (mirroring the All Prompts page's existing pattern, including aria-sort and a chevron indicator) and makes the Prompts, Visibility, SoV, Mentions, Citations, and Last run columns clickable.
  • Clicking a header sorts by that column descending first; clicking again toggles ascending. Default order remains visibility descending, matching the previous hard-coded behavior.

Related issue

Closes #597

Type of change

  • feat — New feature

Checklist

  • Branch follows the naming convention (feature/)
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good reuse of the Prompts sort utilities instead of duplicating them, and the aria-sort/chevron pattern carries over cleanly. Thanks!

@gkhngyk
gkhngyk merged commit 08ff2af into ansvisor:main Aug 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Topic leaderboard columns should be sortable

2 participants