Fix qualifying-points notifications: full-field scoreboard + manual-set announcements #134
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "claude/qp-scoreboard-all-participants"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
Two related fixes to the qualifying-points (QP) Discord notification, based on reported behavior on Wimbledon.
1. Scoreboard sections show the full drafted field
Previously every section was scoped to participants whose QP changed this sync. That's right for Points Awarded and Knocked Out (the pinged "what just happened" sections), but the two scoreboard sections should read as a live standings snapshot:
scoreboard(every drafted participant), scoped to the sports season being announced so a golf pick can't surface in a tennis event.Name (points, manager)line below Top 8, listing everyone not in the top 8 (the exact complement of the Top 8 filter).qpTotal > 0in addition to rank ≤ 8. Early in a season, competition ranking ties all winless players into a rank ≤ 8 band; a rank-only filter would flood the section withT5. Name — 0 QProws.2. Manually set bracket results now announce
Setting a match winner (e.g. a Wimbledon semifinal) wrote QP but sent no Discord message — only
processQualifyingEventnotifies, and the manual paths calledprocessQualifyingBracketEventdirectly. The set-winner, set-round-winners, and complete-round paths now route throughprocessQualifyingEvent. The tournament fan-out still skips the primary window viaskipEventId, so mirror windows aren't double-posted. (reprocess-bracketstays silent — it's a data-correction tool.)Tests
discord.test.ts: scoreboard-sourced Top 8/Non-scoring, compact non-scoring line, ordering, and a regression test that zero-QP players tied into the top-8 rank band stay out of Top 8.qualifying-points-discord.server.test.ts:scoreboardcarries the full drafted field even whenentriesis filtered, and cross-sport participants are excluded.npm run typecheckgreen.🤖 Generated with Claude Code