The game number is redundant with the series summary already shown on
the card. Blurbs now read cleaner: "Win-or-go-home." instead of
"Win-or-go-home — Game 7."
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
seriesStatus updates with the just-played game's win, so once a card goes
FINAL the is_clincher / is_game7 / is_pivotal predicates point at the
upcoming game. Gate the stake badge, stake blurb, and elimination_count
tally on a non-FINAL gameState so a completed Game 3 that left the series
3-0 reads "Flyers lead 3-0" instead of "Flyers can close it out — Game 3."
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Scoreboard payloads don't include gameNumber, so the previous fix fell straight through to series_state['game_number'], which is hi+lo+1 — the *next* game. Once a game goes FINAL the win for this game is already banked in seriesStatus, so the card's own number is hi+lo. For the just-played Game 1 of Kings/Avalanche (series now 1-0), this brings the header back to "Game 1 of 7" instead of "Game 2 of 7".
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
series_state derives game_number from topSeedWins + bottomSeedWins + 1, which becomes the *next* game's number once the API advances seriesStatus post-final. The card for the just-finished game would then read "Game N+1 of 7". Prefer the raw gameNumber on the game payload, falling back to the derived value when it's missing.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Top row now always reads "Game N of 7" (round is already shown by the R1/R2/CONF FINAL/CUP FINAL badge). Bottom blurb drops the trailing period on "Series opener" and uses "{Team} lead X-Y" (plural verb, no "— Game N" suffix) when a leader is established.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The banner read "Day 1 of ~60" on day 2 of the playoffs because the old
anchor recorded whatever date we first polled a playoff game as Day 1.
Now round start dates come from /v1/schedule/playoff-series, so Day N
is authoritative and resets at each round boundary. Drops the noisy
"of ~60" denominator.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Rename single-letter `l` loop variables in bracket_view to satisfy E741
- Drop unused `json` import from test_playoff_cache (F401/F811)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Turn a regular-season-looking Tuesday into a full playoff experience:
- Playoff banner with round + day + series + elimination counts, gold/silver
Cup theme toggled by body.playoff-mode
- Series context on each playoff card: round chip, series score, stake badges
(GAME 7, CLINCHER, PIVOTAL), and one-line blurb
- Game 7s pin to a new Spotlight section above Live
- Playoff OT renders with SUDDEN DEATH badge and pulsing gold border
- Client-side OT notifications via bell button in the banner
- New /series/<id> drill-down with headline, next-game, and game-by-game history
- New /bracket page: 7-column desktop grid, accordion on mobile
- Day N banner count auto-anchors on first playoff scoreboard hit
- SQLite cache for bracket + per-series schedules, stale-on-failure up to 24h
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Unify overlapping late-P3 bonuses into a single score-state lookup, add
high-scoring and goal-spike signals, and tighten every component ceiling so
filling the hype bar is reserved for genuinely rare moments.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pre-game listings are more intuitive in chronological order than ranked
by pregame importance. LIVE and FINAL keep sorting by Priority desc.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Empty net detection: pulled goalie triggers +150-250 bonus, stacks with PP
- Playoff series importance: Game 7 Cup Final = 200, elimination games scale
by round; fallback of 100 when series data unavailable
- Period-aware score differential: 2-goal deficit penalty DECREASES in final
2 min of P3 (goalie-pull zone), 3+ goal games get harsher penalties late
- Persistent comeback narrative: tracks max deficit, sustained bonus for 2+
goal recoveries instead of one-shot spike (0-3 to 3-3 = 150 persistent)
- Shootout special handling: flat base 550 with no time component; ranks below
dramatic close P3 games (skills competition, not hockey)
- Multi-man advantage: parses situationCode for 5v3/4v3, applies 1.6x PP mult
- Non-linear time priority: elapsed^1.5 curve weights final minutes more
- Matchup multiplier rebalance: P1/P2 from 2.0/1.65 to 1.5, tiebreaker not
dominant factor
- Frontend gauge max raised from 700 to 1000 with adjusted color thresholds
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
`is True` strict identity fails if the NHL API returns an integer 1
instead of a JSON boolean. A truthy check is safe here since the
Intermission field is always False/0 for non-intermission live games.
Also adds a test that verifies intermission games are separated from
live games in the /scoreboard response.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The NHL API nests situationDescriptions under situation.homeTeam /
situation.awayTeam, not at the top level. The old flat-structure
lookup always returned an empty list, silently breaking both the
PP indicator on the frontend and the PP bonus in the hype score.
Updated get_power_play_info, the _priority_components PP check,
and all test fixtures to match the real API shape.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds calculate_game_importance() that boosts Priority for high-stakes
regular-season matchups based on season progress (sharp ramp after game
55), playoff bubble proximity (wildcard rank ~17-19 = max relevance),
and divisional/conference rivalry (1.4x/1.2x multipliers). Max bonus
150 pts applied to both LIVE and PRE games; playoff and FINAL games
are unaffected. Extends standings schema with division, conference,
games_played, and wildcard_sequence fields fetched from the NHL API.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Period base: playoff OT escalates indefinitely (P4=600, P5=750…),
reg season P4=5-min OT (600), P5=shootout (700)
- Time priority range increased (max ~300 vs old ~120), calibrated
to period length so 5-min reg season OT reads correctly
- Matchup multiplier inverted: higher period = less weight (any OT
is exciting regardless of teams)
- Replace unconditional score_total with closeness bonus: rewards
tight games regardless of goal volume (5-4 == 1-0 at same diff)
- Power play bonus: 30 (P1/P2) → 50/100/150 (P3 by time) → 200 (OT)
- Comeback bonus: one-time pulse (+50/75/100 by period) when trailing
team scores to within 2 goals; keyed on team names, clears after
firing, skips intermission
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- utc_to_eastern: use zoneinfo instead of hardcoded EDT offset (-4)
so start times are correct in both EST and EDT
- standings: fetch before truncate so a failed API call doesn't wipe
existing standings data
- routes: call parse_games() once per request instead of three times
- scheduler: wrap run_pending() in try/except so an unhandled exception
doesn't kill the background thread
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>