Don't ping owners on rank-only standings changes in Discord #130

Merged
chrisp merged 1 commit from claude/no-ping-rank-only-standings into main 2026-07-05 07:00:46 +00:00
Owner

Problem

The first score of a season displaces every other team's rank (everyone becomes T2), which fired a mass @-ping of the whole league — even though only one owner actually scored. The Standings Changes section pinged the Discord user of every team whose rank or points changed.

Fix

The Standings Changes section now pings an owner only when that team's points genuinely changed this event. Rank-only shufflers are still displayed (with their ↑/↓ rank delta) but by name, without an @-mention.

This mirrors the existing "display but don't ping" behaviour in the Scored Matches section, and preserves pings for pure season-standings sports (F1, IndyCar) — where the Standings Changes section is the only ping source and a real scorer's points always change.

Scoped to the main standings path only; the QP path lists just this-event participants, so it never produced the shuffle ping.

Tests

Added pings scorers but not rank-only shufflers to discord.test.ts, asserting a displaced-only team is displayed with its delta but excluded from content/allowed_mentions, while the scorer keeps its mention. npm run test:run (62 passing) and npm run typecheck both green.

🤖 Generated with Claude Code

## Problem The first score of a season displaces every other team's rank (everyone becomes `T2`), which fired a mass `@`-ping of the whole league — even though only one owner actually scored. The **Standings Changes** section pinged the Discord user of *every* team whose rank **or** points changed. ## Fix The Standings Changes section now pings an owner only when that team's **points genuinely changed** this event. Rank-only shufflers are still **displayed** (with their `↑/↓` rank delta) but by name, without an `@`-mention. This mirrors the existing "display but don't ping" behaviour in the Scored Matches section, and preserves pings for pure season-standings sports (F1, IndyCar) — where the Standings Changes section is the only ping source and a real scorer's points always change. Scoped to the main standings path only; the QP path lists just this-event participants, so it never produced the shuffle ping. ## Tests Added `pings scorers but not rank-only shufflers` to `discord.test.ts`, asserting a displaced-only team is displayed with its delta but excluded from `content`/`allowed_mentions`, while the scorer keeps its mention. `npm run test:run` (62 passing) and `npm run typecheck` both green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chrisp added 1 commit 2026-07-05 05:02:26 +00:00
Don't ping owners on rank-only standings changes in Discord
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 3m24s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m23s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
🚀 Deploy / 🧪 Test (push) Successful in 3m17s
🚀 Deploy / ʦ🔍 Typecheck & Lint (push) Successful in 1m28s
🚀 Deploy / 🐳 Build (push) Successful in 1m11s
🚀 Deploy / 🚀 Deploy (push) Successful in 11s
3f6af2665e
The first score of a season displaces every other team's rank (e.g.
everyone becomes T2), which fired a mass @-ping of the whole league even
though only one owner actually scored. The Standings Changes section
pinged every team whose rank *or* points changed.

Now the section pings an owner only when that team's points genuinely
changed this event; rank-only shufflers are still displayed with their
rank delta, but by name and without a mention. Mirrors the existing
"display but don't ping" behaviour in the Scored Matches section and
preserves pings for pure season-standings sports (F1, IndyCar), where a
real scorer's points always change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chrisp merged commit 3f6af2665e into main 2026-07-05 07:00:46 +00:00
chrisp deleted branch claude/no-ping-rank-only-standings 2026-07-05 07:00:46 +00:00
Sign in to join this conversation.
No description provided.