feat: weight merged PRs above LOC in usage leaderboard sorting (#1563)

Move merged_prs to the primary sort key in the agent usage leaderboard,
ahead of agent_loc, prs_opened, and agent_runs. Update the UI description
to reflect the new ranking order.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
This commit is contained in:
Johannes du Plessis 2026-06-17 10:59:42 -07:00 • committed by GitHub
parent d2c232cc54
commit efe07486e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -398,6 +398,7 @@ async def _build_usage_leaderboard_snapshot(period: Period) -> dict[str, Any]:
sorted_users = sorted(
users.values(),
key=lambda item: (
-item["merged_prs"],
-item["agent_loc"],
-item["prs_opened"],
-item["agent_runs"],

View file

@ -63,7 +63,7 @@ function UsagePage() {
<AppShell user={session.data} title="Usage" className="max-w-5xl">
<SettingsSection
title="Agent leaderboard"
description="Ranked by agent lines of code, then PRs opened and agent runs."
description="Ranked by merged PRs, then agent lines of code, PRs opened, and agent runs."
action={
<Select
value={activePeriod}