mlb fix #87

Merged
chrisp merged 2 commits from claude/nice-goldberg-ub4bcy into main 2026-06-12 04:09:52 +00:00
Owner
No description provided.
chrisp added 2 commits 2026-06-12 02:53:42 +00:00
When ESPN's API returns teams directly on the conference group (no division
children), all teams got division="" so only one team globally received
divisionRank=1. Fix by resolving division from a hardcoded team-name map
as a fallback, and scoping divisionRank computation per conference+division
to prevent AL/NL teams from sharing a group.

https://claude.ai/code/session_01288dkXYwKJUfXrEhPd8rmo
Fix divisionRank ordering and add warning for unknown teams
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m48s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Failing after 49s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
0799177099
Sort teams by win-loss within each division group before assigning
divisionRank so that the leader is always the best-record team, not
whichever team happened to appear first in ESPN's flat response.

Also warn to console when a team's displayName isn't in the hardcoded
MLB_TEAM_DIVISION map, surfacing renames or expansion teams immediately
instead of silently storing division="" and recreating the display bug.

https://claude.ai/code/session_01288dkXYwKJUfXrEhPd8rmo
chrisp force-pushed claude/nice-goldberg-ub4bcy from 0799177099 to c97e90b3ac 2026-06-12 04:04:33 +00:00 Compare
chrisp merged commit 058e96e67e into main 2026-06-12 04:09:52 +00:00
chrisp referenced this pull request from a commit 2026-06-12 04:09:54 +00:00
chrisp deleted branch claude/nice-goldberg-ub4bcy 2026-06-12 04:09:56 +00:00
Sign in to join this conversation.
No description provided.