docs(baseball-scoreboard): document every setting, with a real live scorebug - #360
Merged
Conversation
…corebug Documentation only for the plugin; no behaviour change. Two additions to the shared doc tooling, both forced by this plugin. The README covered a fraction of the plugin's 279 settings and had no images. It now leads with the structural thing that actually trips people up: almost every setting lives inside a per-league block (mlb / milb / ncaa_baseball) and only nine are plugin-wide, so favorite_teams at the top level does nothing at all. Three leagues means three independent favourite lists, three sets of durations, three sets of filtering. Game selection is written out: the three paths, and that upcoming_games_to_show is a per-team budget under show_favorite_teams_only but a total otherwise. The four extra baseball screens (pitcher/batter, last play, player card, traditional scoreboard) are documented as off-by-default and each costing an extra per-game fetch, along with the fact that show_last_play only adds a field to the pitcher/batter screen rather than being a screen of its own. show_odds is described but deliberately not screenshotted. It is fetched asynchronously on a background thread after the card is drawn, so a single frame cannot show it -- that is a limit of how these images are made, not a plugin fault, and claiming otherwise would have been wrong. Tooling: http_replay -------------------- The recent and upcoming managers read through the cache, but the live manager calls _fetch_todays_games() straight over HTTP with no cache read, so seeded cache fixtures cannot reach the live screen -- the plugin's own harness works around this with a synthetic built-in game. Rather than document baseball's headline screen with synthetic data, shots can now name a recorded-responses file. Only matching URLs are served locally; everything else, logo downloads included, still goes to the network. The live shot is a genuine MLB game in progress on 2 September 2026, and it re-renders identically every time. The recorded payloads are stripped of fields the plugin never reads, which took them from 2.1MB to 660KB. That was verified rather than assumed: rendering against the full and stripped recordings produces byte-identical PNGs. Tooling: deep merge ------------------- Shot config was merged over defaults with a shallow dict.update(), so a shot overriding one key of a league block replaced the whole block -- including mlb.enabled -- and the plugin rendered nothing for a reason that looked nothing like the cause. Config overlays now merge recursively. This affected every plugin with nested config; baseball is just where it first bit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Security | 1 medium |
🟢 Metrics 26 complexity
Metric Results Complexity 26
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Reviewing my own diff against main, the rewrite was a net loss of information: better organised, but several sections of hard-won documentation were gone. Restored and folded into the new structure. The worst of it was a correction to my own framing. upcoming_games_to_show is a POOL size, not a card count: the panel shows one game at a time and keeps its place between visits, so raising it lengthens the lap and any one game comes round LESS often. My version implied the opposite, which would have sent someone the wrong way. Also restored, all of it verified against the schema: - other_games_min_quality's real values (ranked/broadcast/any) and the fact that it is inert in MLB and MiLB, which publish no poll; other_games_divisions needs ESPN's FBS/FCS group rosters, which exist for college football and nothing else, so it is inert in this plugin entirely. I had described it as "NCAA only", which is wrong. - That favourites are never filtered by either setting, how the non-favourite pool is ordered, and that both filters fail open -- twice, including as a set. - The traditional scoreboard's full customization table (16 options), the at_bat_info table, and the player_card table. - That all four extra screens are MLB and NCAA only -- MiLB's data does not come from ESPN in the same shape -- and that the pitcher/batter and player card screens are live-games-only, which is why only the traditional scoreboard has a game_scope. - The whole scroll_card matchup-card section: separator, the two date formats and why their defaults differ, time format, swap behaviour. - The customization font/colour group table. - The stale "UTC" timezone migration note. - The non_favorite_live_game_duration truth table. - Favourite result colours, the Vegas ticker weighting, team abbreviations, installation, and per-league background_service. Checked mechanically as well as by eye: every config token the old README mentioned now appears in the new one, bar six bare names I document under their full path. All TOC anchors resolve. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Third plugin in the README pass. Documentation only for the plugin; two additions to the shared doc tooling, both forced by this plugin and both fixing things that would have bitten every later one.
The README
Covered a fraction of the plugin's 279 settings and had no images. It now leads with the structural thing that actually trips people up: almost every setting lives inside a per-league block (
mlb/milb/ncaa_baseball) and only nine are plugin-wide — sofavorite_teamsat the top level does nothing at all. Three leagues means three independent favourite lists, three sets of durations, three sets of filtering.Game selection is written out: the three paths, and that
upcoming_games_to_showis a per-team budget undershow_favorite_teams_onlybut a total otherwise.The four extra baseball screens (pitcher/batter, last play, player card, traditional scoreboard) are documented as off-by-default and each costing an extra per-game fetch — plus the non-obvious bit that
show_last_playonly adds a field to the pitcher/batter screen rather than being a screen of its own.show_oddsis described but deliberately not screenshotted. It's fetched asynchronously on a background thread after the card is drawn, so a single frame can't show it. That's a limit of how these images are made, not a plugin fault — I nearly wrote it up as a dead setting the way I did for AFL, and checking first is what stopped me.Tooling:
http_replayThe recent and upcoming managers read through the cache, but the live manager calls
_fetch_todays_games()straight over HTTP with no cache read — so seeded cache fixtures can't reach the live screen at all. The plugin's own harness works around this with a synthetic built-in BOS@NYY game.Documenting baseball's headline screen with synthetic data seemed like the wrong trade, so shots can now name a recorded-responses file. Only matching URLs are served locally; everything else — logo downloads included — still goes to the network.
The result: the live shot is a genuine MLB game in progress on 2 Sept 2026 (SD 3 – CIN 4, top of the 4th, two out), and it re-renders identically every time.
Recorded payloads are stripped of fields the plugin never reads, taking them from 2.1MB to 660KB. Verified rather than assumed — rendering against the full and stripped recordings produces byte-identical PNGs.
Tooling: deep merge
Shot config was merged over defaults with a shallow
dict.update(), so a shot overriding one key of a league block replaced the whole block — includingmlb.enabled— and the plugin rendered a blank panel for a reason that looked nothing like the cause. Config overlays now merge recursively.This affected every plugin with nested config. Baseball is just where it first bit, and it cost me a while to find, so it's worth having fixed before the remaining scoreboards.
Verification
python scripts/check_plugin.py --plugin baseball-scoreboard— 24/24 PASSpython scripts/render_docs_assets.py --plugin baseball-scoreboard --check— images matchpython scripts/check_module_collisions.py— OK across 43 pluginsplugins.jsonregenerated🤖 Generated with Claude Code