Show non-eliminated loser's manager tag in Scored Matches notifications #136

Merged
chrisp merged 1 commit from claude/scored-match-loser-tag into main 2026-07-16 04:45:58 +00:00
Owner

Problem

In playoff "Scored Matches" Discord notifications, the winner's manager tag was shown unconditionally but the loser's was gated behind isLoserNotifiable, which is only true when the loser scored or was eliminated. A World Cup semifinal loser (drops to the 3rd-place playoff) or an AFL Qualifying-Final loser (1v4 / 2v3, drops to a Semi Final) is neither, so their tag was dropped:

Scored Matches
• Argentina (philosohraptors) def. England        ← England's manager missing

Fix

Decouple the loser's display name from the ping gate, mirroring the winner:

  • loserUsername is now populated whenever the loser's team is drafted.
  • loserDiscordUserId (the @-ping) stays gated by showLoser — a still-alive loser who neither scored nor was eliminated is named for context but not pinged.
Scored Matches
• Argentina (philosohraptors) def. England (elementsoul)

isLoserNotifiable, the match-announce filter, and the discord.ts renderer are all untouched — only which matches surface is unchanged; the loser's name is simply no longer suppressed.

Tests

Added a discord.test.ts case asserting a non-eliminated loser is named by plain username but not @-pinged, while the scoring winner is. npm run typecheck clean; discord + process-match-result suites pass.

🤖 Generated with Claude Code

## Problem In playoff **"Scored Matches"** Discord notifications, the winner's manager tag was shown unconditionally but the loser's was gated behind `isLoserNotifiable`, which is only true when the loser scored or was *eliminated*. A World Cup semifinal loser (drops to the 3rd-place playoff) or an AFL Qualifying-Final loser (1v4 / 2v3, drops to a Semi Final) is neither, so their tag was dropped: ``` Scored Matches • Argentina (philosohraptors) def. England ← England's manager missing ``` ## Fix Decouple the loser's *display name* from the *ping* gate, mirroring the winner: - `loserUsername` is now populated whenever the loser's team is drafted. - `loserDiscordUserId` (the @-ping) stays gated by `showLoser` — a still-alive loser who neither scored nor was eliminated is **named for context but not pinged**. ``` Scored Matches • Argentina (philosohraptors) def. England (elementsoul) ``` `isLoserNotifiable`, the match-announce filter, and the `discord.ts` renderer are all untouched — only which matches surface is unchanged; the loser's name is simply no longer suppressed. ## Tests Added a `discord.test.ts` case asserting a non-eliminated loser is named by plain username but **not** @-pinged, while the scoring winner is. `npm run typecheck` clean; discord + process-match-result suites pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chrisp added 1 commit 2026-07-16 04:36:41 +00:00
Show non-eliminated loser's manager tag in Scored Matches notifications
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 3m7s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m24s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
🚀 Deploy / 🧪 Test (push) Successful in 3m5s
🚀 Deploy / ʦ🔍 Typecheck & Lint (push) Successful in 1m22s
🚀 Deploy / 🐳 Build (push) Successful in 1m12s
🚀 Deploy / 🚀 Deploy (push) Successful in 12s
932f36ca07
In playoff "Scored Matches" Discord notifications, the winner's manager tag
was shown unconditionally but the loser's was gated behind isLoserNotifiable,
which is only true when the loser scored or was eliminated. A World Cup
semifinal loser (drops to the 3rd-place playoff) or an AFL Qualifying-Final
loser (drops to a Semi Final) is neither, so their tag was dropped:

  • Argentina (philosohraptors) def. England

Decouple the loser's display name from the ping gate, mirroring the winner:
loserUsername is now shown whenever the loser's team is drafted, while the
@-ping (loserDiscordUserId) stays gated by showLoser. A still-alive loser is
named for context but not pinged:

  • Argentina (philosohraptors) def. England (elementsoul)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chrisp merged commit 932f36ca07 into main 2026-07-16 04:45:58 +00:00
chrisp deleted branch claude/scored-match-loser-tag 2026-07-16 04:45:58 +00:00
Sign in to join this conversation.
No description provided.