Skip to content

fix(scoreboards): make the odds text settings reachable in the web UI - #403

Merged
ChuckBuilds merged 1 commit into
mainfrom
fix/odds-text-property-order
Sep 3, 2026
Merged

fix(scoreboards): make the odds text settings reachable in the web UI#403
ChuckBuilds merged 1 commit into
mainfrom
fix/odds-text-property-order

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

main is currently red on scripts/test_property_order_coverage.py, and this fixes it.

#402 added customization.odds_text to the schema but not to x-propertyOrder. The web UI's config form iterates that list and nothing else, so the font, size and colour controls shipped and could not be reached — the setting existed only for anyone hand-editing config.json.

every declared setting must be reachable in the config form
        afl-scoreboard: customization.odds_text
        baseball-scoreboard: customization.odds_text
        ... (all 8)
  FAIL  43 schemas, none hiding a declared setting (8 hidden)

That guard exists precisely to catch this, and it did its job — it surfaced on #366 because that branch merged main. The guard passes with this change.

odds_text is placed immediately after detail_text, which is what it was split off from, so the two sit together in the form.

Nothing drawn changes — this only makes existing settings editable. Patch-level version bumps.

#402 added customization.odds_text to the schema but not to x-propertyOrder.
The config form iterates that list and nothing else, so the font, size and
colour controls shipped and could not be reached -- the setting existed only
for anyone hand-editing config.json.

scripts/test_property_order_coverage.py exists to catch exactly this and is
currently failing on main: "43 schemas, none hiding a declared setting (8
hidden)". This turns it green again.

odds_text is placed immediately after detail_text, which is what it was split
off from, so the two sit together in the form.

Nothing drawn changes -- this only makes existing settings editable.
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 7c3c10ab-6106-4617-a96a-42efb187f2bf


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

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.

@ChuckBuilds
ChuckBuilds merged commit 9fc57a6 into main Sep 3, 2026
4 checks passed
@ChuckBuilds
ChuckBuilds deleted the fix/odds-text-property-order branch September 3, 2026 17:57
ChuckBuilds pushed a commit that referenced this pull request Sep 3, 2026
main gained #403, which adds odds_text to x-propertyOrder in all eight
scoreboards and bumps each a patch level. That is the only reason the manifests
conflicted again; no code conflicted.

Versions recomputed above main's: afl 1.22.0, baseball 1.40.0, basketball
1.29.0, football 3.4.0, hockey 1.25.0, lacrosse 1.24.0, nrl 1.21.0, soccer
2.24.0.

Verified all four layers coexist rather than assuming it -- the sports_shared
mixin, #359's sports_card delegations, #402's odds wiring, and #403's
x-propertyOrder entry are present together in every plugin. Four changes have
now landed on the same files this branch edits, so composition is the thing
most likely to break silently.

test_property_order_coverage.py, the guard that was failing this branch, now
passes: it was #402's omission, fixed by #403, not a defect here.
ChuckBuilds pushed a commit that referenced this pull request Sep 3, 2026
Down from 21 CI mismatches to 3, all of them baseball's upcoming card -- the
only card in the set that draws a clock time.

The config set no timezone, so the time rendered in the machine's local zone:
America/New_York where the goldens were generated, UTC on the runner. The
goldens encoded where they were made rather than what the plugin draws.

Pinned to "Etc/UTC", not "UTC": the plugins treat a bare "UTC" as a leftover
from an old config write-back bug and override it with the system zone, which
would have left the same problem in place while looking fixed.

Verified the way the previous attempt was not -- by rendering under other
zones rather than hoping CI agrees. The goldens match under TZ=UTC and
TZ=America/Los_Angeles as well as locally, and widening the centre gap by 2px
still fails 24 of the 72 cards.

Also merges main for #403, whose x-propertyOrder fix this branch predated; the
property-order guard passes again.
ChuckBuilds added a commit that referenced this pull request Sep 3, 2026
…404)

* test: guard the scroll/Vegas card, without depending on logo assets

Re-lands the guard pulled from #359, rebuilt so it cannot fail on inputs that
are not the plugin's rendering.

Why it exists: check_plugin.py drives every scoreboard in `switch` mode, so its
renders come from the full-screen scorebug in sports.py. game_renderer.py --
the scroll/Vegas card renderer -- is imported but never called. Replacing
render_game_card, _draw_upcoming_center, _center_gap_width and
_logo_slot_width with functions that raise leaves all 16 of hockey's harness
renders passing and byte-identical. A harness.json variant setting
`*_display_mode: "scroll"` does not help either: those renders come out
identical to the switch ones.

Why the first attempt failed: it rendered with real logos loaded from the core
checkout, and 21 of its 72 goldens differed in CI on the *same* Pillow 12.3.0.
The logo files themselves vary between checkouts -- main recently dropped
case-colliding duplicate league logos -- so the goldens encoded one machine's
asset set rather than the plugin's rendering.

The cards are now drawn without logos, leaving the repo's own fonts as the only
input. The geometry is still covered: _center_gap_width and _logo_slot_width
are computed to lay the card out whether or not a logo is painted.

Verified it still bites: widening the centre gap by 2px in the core mixin fails
24 of the 72 cards; on the clean tree all 72 pass, twice in a row.

Two details kept from the first version, both deliberate: it asserts the card
COUNT rather than only the mismatch count, because a comparison whose inputs
quietly went missing reports zero differences and reads as a pass; and it
chdir()s to the core, because the plugins' default logo_dir values are relative
and resolve only from there.

* test: pin the guard's timezone so the goldens are not machine-specific

Down from 21 CI mismatches to 3, all of them baseball's upcoming card -- the
only card in the set that draws a clock time.

The config set no timezone, so the time rendered in the machine's local zone:
America/New_York where the goldens were generated, UTC on the runner. The
goldens encoded where they were made rather than what the plugin draws.

Pinned to "Etc/UTC", not "UTC": the plugins treat a bare "UTC" as a leftover
from an old config write-back bug and override it with the system zone, which
would have left the same problem in place while looking fixed.

Verified the way the previous attempt was not -- by rendering under other
zones rather than hoping CI agrees. The goldens match under TZ=UTC and
TZ=America/Los_Angeles as well as locally, and widening the centre gap by 2px
still fails 24 of the 72 cards.

Also merges main for #403, whose x-propertyOrder fix this branch predated; the
property-order guard passes again.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants