Re-land per-user effective max on leaderboards (stacked-merge fix) - #8
Merged
Merged
Conversation
Builds on the forfeitedKnockoutPoints field shipped with the
closed-group bracket-seeding change. Each row's Total column now reads
as `score / per-user maximum` where the maximum is
`tournament.rules.totalMaximumPoints − forfeitedKnockoutPoints`.
When no group has closed with corrected seeding yet, every player's
max equals the tournament-wide max and the column reads the same for
all rows. Once a player has at least one knockout match whose actual
participants did not include their stored pick, that player's max
drops by the round's `pointsPerCorrect` and a single explanatory
footnote is rendered below the table.
The global leaderboard and profile still show earned totals only —
they aggregate across multiple tournaments and a cross-tournament
maximum is not yet exposed by the API. Left as a follow-up.
- `src/pages/Leaderboard.jsx`, `src/pages/League.jsx`: render
`score / effective_max` per row; conditional footnote
- `src/index.css`: `.leaderboard-table-footnote` style
- `src/i18n/messages/{en,es,pt,it,nl}.js`: `leaderboard.effectiveMaxTooltip`
and `leaderboard.effectiveMaxNote`
- `docs/QA_CHECKLIST.md`: cover the new display in §14 and §15
- `docs/IMPLEMENTATION_STATUS.md`: note current coverage and the
global/profile follow-up
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Why this exists
PR #7 was marked MERGED in the GitHub UI on 2026-06-15 with merge commit
e96591b, but that commit is unreachable from `main`. Its content (the `forfeitedKnockoutPoints` display on the tournament and league leaderboards, the explanatory footnote, the 5 i18n keys, the `.leaderboard-table-footnote` style, and the QA / status doc updates) never actually landed.Root cause is a stacked-PR merge edge case: PR #7 was based on `ux/closed-group-bracket-seeding` (PR #6). When PR #6 was squash-merged to `main` and the base branch deleted, PR #7's auto-retargeted merge against the new base produced an orphan merge commit that didn't update `main`'s tip.
This PR re-applies PR #7's commit (`647c570`) on top of current `main` (`0e2ae64`). Cherry-pick was clean — only trivial auto-merges in shared i18n files and `docs/QA_CHECKLIST.md`.
What changes
Identical to the original PR #7:
Test plan
Notes for future stacked PRs
Per the user-rule "Never commit directly to main", future stacked PRs should either:
Made with Cursor