Conversation
Headshots and team kills already flow through the same query as every other stat (base CTE in leaderboards.ts computes both from the kill feed), but BoardMetric, metricValue and METRIC_SQL never had cases for them, so the two columns rendered as plain <th> instead of SortHeader. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BWZwm5xPaSTDmhB8qnddaM
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
baseCTE insrc/lib/server/leaderboards.ts) and already ride along on everyBoardRow, butBoardMetric,metricValueandMETRIC_SQLhad no cases for them.LeaderboardTable.svelterendered theHSandTKheaders as plain<th>instead ofSortHeader, while every other numeric column (K, D, K/D, K/h, Matches, W-L-D, Win %, Cash) is sortable.'headshots'and'teamKills'as board metrics end to end: type, label,metricValue, SQLORDER BYexpression, and wraps the two headers inSortHeader.Test plan
bun test src/lib/leaderboard.test.ts— 15 passbun run check(svelte-check) — 0 errors; verified the checker actually catches a broken case by injecting one deliberately, then reverted