镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(football): adaptive layout keeps NFL and NCAA logos apart (3.18.2) - #598

Merged
ChuckBuilds merged 1 commit into
mainfrom
claude/football-adaptive-logo-scope
Oct 2, 2026
Merged

ChuckBuilds merged 1 commit into
mainfrom
claude/football-adaptive-logo-scope

Conversation

@ChuckBuilds

@ChuckBuilds ChuckBuilds commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Why

NFL and NCAA FB share ten team abbreviations (CAR CIN DAL DEN HOU LAC MIA NE TB TBD), and one scroll strip carries both leagues. The classic logo cache was already scoped by logo directory (_logo_scope, see test_logo_cache_league_scope.py). The adaptive layout path (layout_mode: adaptive) keeps two caches of its own, and both were still keyed by abbreviation alone:

  • _raw_logo_cache (unresized logos), keyed "MIA";
  • the LayoutContext fit, cached under cache_key="logo:MIA".

Whichever Miami was drawn first won: the Hurricanes' card showed the Dolphins' logo, or the other way round. This was found during a core performance investigation (LEDMatrix #716–#719).

What

  • Both keys now include self._logo_scope(logo_path), the same scoping the classic cache uses.
  • Classic layout is untouched, and the adaptive golden images are unchanged.
  • Bumps football-scoreboard to 3.18.2, with a new versions[] entry and a CHANGELOG entry. plugins.json was updated via update_registry.py.

Tests

test_adaptive_logo_league_scope.py (new, standalone like the other adaptive tests; needs LEDMATRIX_CORE) renders an NFL MIA card and then an NCAA MIA card on one adaptive renderer, in both orders, and checks:

  • each card shows only its own logo colour;
  • the same directory and abbreviation share one cache entry.

On origin/main all 3 checks fail: the second card shows 1,936 px of the other league's logo and none of its own. With the fix, 3 pass.

Existing tests also pass: test_logo_cache_league_scope.py (8), test_adaptive_score_clears_logos.py (68 checks), and test_adaptive_layout_mode / text_colors / upcoming_stacks / scorebug_settings (27, including goldens).

Guards: check_version_bump football-scoreboard PASS, check_manifests_ascii, check_min_core_version, check_module_collisions and check_sports_helpers_parity all PASS.

🤖 Generated with Claude Code

NFL and NCAA FB share ten abbreviations (CAR CIN DAL DEN HOU LAC MIA NE
TB TBD) and one scroll strip carries both leagues. The classic logo cache
is scoped by logo directory, but the adaptive path's two caches were not:
_load_raw_logo keyed the unresized logo by abbreviation alone, and the
LayoutContext fit was cached under "logo:<abbr>". Whichever Miami was
drawn first -- Dolphins or Hurricanes -- was drawn on the other's card.
Both keys now include _logo_scope(logo_path). Classic layout unchanged.

Bumps football-scoreboard to 3.18.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 2, 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: Advanced

Run ID: 628e2d6c-68cc-4965-9335-ceacbba7df23

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

🟢 Metrics 19 complexity

Metric Results
Complexity 19

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 4d50ed8 into main Oct 2, 2026
5 checks passed
@ChuckBuilds
ChuckBuilds deleted the claude/football-adaptive-logo-scope branch October 2, 2026 00:53
ChuckBuilds added a commit that referenced this pull request Oct 2, 2026
Conflicts were the 3.18.2 metadata #598 just squash-merged: the branch's
manifest and CHANGELOG already carry it under 3.18.3; plugins.json taken
from main and regenerated.

Co-Authored-By: Claude Opus 5.5 <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.

1 participant