Skip to content

Re-land per-user effective max on leaderboards (stacked-merge fix) - #8

Merged
borland667 merged 1 commit into
mainfrom
ui/relaunch-leaderboard-effective-max
Jun 16, 2026
Merged

Re-land per-user effective max on leaderboards (stacked-merge fix)#8
borland667 merged 1 commit into
mainfrom
ui/relaunch-leaderboard-effective-max

Conversation

@borland667

Copy link
Copy Markdown
Owner

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:

  • `src/pages/Leaderboard.jsx`, `src/pages/League.jsx`: render `score / per-user max` per row + conditional footnote
  • `src/index.css`: `.leaderboard-table-footnote` style
  • `src/i18n/messages/{en,es,pt,it,nl}.js`: `leaderboard.effectiveMaxTooltip` + `leaderboard.effectiveMaxNote`
  • `docs/QA_CHECKLIST.md` §14 / §15 cover the new display
  • `docs/IMPLEMENTATION_STATUS.md` notes coverage + the global/profile follow-up

Test plan

  • `npm run verify` clean (49/49 tests pass, build OK)
  • Tournament/league leaderboard renders `Total: 0 / N` on a fresh tournament
  • After a closed group + a knockout match whose participants did not include a user's stored pick is scored, that user's row drops by `pointsPerCorrect` and the footnote appears
  • Users with no forfeits still read `X / N`

Notes for future stacked PRs

Per the user-rule "Never commit directly to main", future stacked PRs should either:

  • be merged in strict bottom-up order with `gh pr merge --rebase` (not squash), OR
  • be retargeted to `main` manually before merging the base, OR
  • be rebased onto `main` and re-pushed once the base is merged

Made with Cursor

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>
@borland667
borland667 merged commit 62f749f into main Jun 16, 2026
6 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.

1 participant