Fix minor correctness issues for older years - #416
Open
chondl wants to merge 1 commit into
Open
Conversation
- teams Bubble Chart: guard RP_NAMES[year] so a no-season year (2021) renders its graceful no-data state instead of a client-side crash - match breakdown: render N/A instead of literal NaN in predicted Auto/Teleop/Endgame/Fouls totals on pre-component-era (2002-2015) matches - TBA parsing: derive elim match winners from scores when winning_alliance is absent (2015 QF/SF), keeping 2015 quals winner-less
|
@chondl is attempting to deploy a commit to the avgupta456's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three independent minor correctness fixes surfaced by a full staging audit performed by Claude Code. Each is small and self-contained. Verified against a local rig (CockroachDB + fake-gcs + full 2026 season, 3724 teams / 215 events / 18372 matches).
1. Team pages bubble chart
/teams?year=2021unhandled exceptionRP_NAMES(frontend/src/constants.tsx) has no2021key (2021 had no traditional season). The teams Bubble ChartcolumnOptionsdereferencedRP_NAMES[year][0]for anyyear >= 2016, throwing aTypeErrorat render → "Application error: a client-side exception has occurred"./events?year=2021already degrades gracefully;/teamsnow does too.Fix: guard the two ranking-point columns on
RP_NAMES[year]instead ofyear >= 2016, so a no-season year drops those columns and falls through to the normal no-data state.2. Match pages display literal "NaN" in predicted component cells for pre-2016 match pages
On pre-component-era matches (2002–2015, e.g.
/match/2015casj_qm1) the Predicted Auto/Teleop/Endgame/Fouls alliance totals sum per-team component EPAs that don't exist for those years, producingNaN, which rendered as the literal text "NaN". Sibling cells already use "N/A".Fix: treat a
NaNalliance total the same asnulland render "N/A".3. Winner incorrect for 2015 elimination matches
get_event_matches(backend/src/tba/read_tba.py) forcedwinner = Nonefor every 2015 match that wasn't a Final, and fell back toTIE(never a score comparison) when TBA'swinning_alliancewas absent. 2015 QF/SF elims — which did have winners — came back winner-less (14/16 elims on2015new), breaking win/loss records, event prediction accuracy, and the match "Actual Winner" display. 2015 quals (Recycle Rush, cooperative) legitimately have no winner.Fix: when
winning_allianceis absent, derive the winner from the alliance scores; restrict the 2015 winner-less rule to quals (comp_level == "qm") only.Verified against live TBA for
2015new/2015casj: before → QF 8/8 + SF 6/6 winner-less; after → all elim winners derived from score, all quals still winner-less.