Skip to content

Make release notes follow the selected firmware variant's repo#21

Merged
bharvey88 merged 2 commits into
mainfrom
feat/per-variant-repo
Jul 20, 2026
Merged

Make release notes follow the selected firmware variant's repo#21
bharvey88 merged 2 commits into
mainfrom
feat/per-variant-repo

Conversation

@bharvey88

Copy link
Copy Markdown
Collaborator

Makes the "What's new" release-notes box and the fallback release links follow the selected firmware variant's repo, instead of always using the single device-level repo. This fixes the M-1: selecting "WLED 16.0.1 (Rev6 only)" now surfaces WLED-M1's release notes and links, while the two WLED-MM 14.5.1 variants and the top-of-page GitHub link stay on WLED-MM-M1.

How it works:

  • Optional repos map in devices.json mirroring firmware/config (channel to variant to "owner/name"), listing only overrides. The M-1 lists just the 16.0.1 override; every other device omits the field and behaves exactly as before.
  • A repoFor(device, channel, variant) resolver in device.js that falls back to device.repo. The release-notes box, its Full-release/recent-releases links, and the USB-fallback "latest release" link route through it.
  • Also fixes a latent bug: release notes never re-rendered on variant change (only on channel change), so they now refresh when you toggle variants.
  • A network-free validator guard (check_repos_shape) rejects a malformed map or a repo attached to a non-existent variant, so a typo can't silently fall back to the wrong repo.

Scope note: the header "GitHub" link and the "Classic installer" links stay device-level by design (page identity), so a 16.0.1 user who falls back to the classic installer still lands on the WLED-MM-M1 page. That can be made per-variant later if wanted.

Tests: Playwright 22/22 (new test proves the release-notes repo flips from WLED-MM-M1 to WLED-M1 on variant select and back); validator unit tests 20/20; validate_registry.py green against the live registry.

🤖 Generated with Claude Code

Add check_repos_shape, a network-free validator for the new optional
repos field in devices.json (channel -> variant -> "owner/name").
Absent repos is valid; every variant key must exist in the device's
firmware map so a mistyped key can't silently fall back to the
device repo unnoticed. Wired into main() alongside the existing
config shape check.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add a per-variant repos map so a firmware variant that ships from a
different GitHub repo than the device default (M-1's WLED 16.0.1
Rev6-only build, which lives in ApolloAutomation/WLED-M1 instead of
the device-level ApolloAutomation/WLED-MM-M1) gets correct release
notes and fallback release links instead of always resolving against
device.repo.

Add repoFor(device, channel, variant) in js/views/device.js, route
the three device.repo uses in renderReleaseNotes() and the USB-fallback
release link in renderInstall() through it, and re-render release
notes when the variant selection changes (it previously did not
re-render at all on variant change). The header GitHub link stays on
device.repo, unchanged.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@bharvey88, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 871bcc40-80b7-4824-9799-c79118fe261f

📥 Commits

Reviewing files that changed from the base of the PR and between 456dddb and 6cf74d1.

📒 Files selected for processing (5)
  • devices.json
  • js/views/device.js
  • scripts/test_validate_registry.py
  • scripts/validate_registry.py
  • tests/installer.spec.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/per-variant-repo

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.

@bharvey88
bharvey88 merged commit cde8bb7 into main Jul 20, 2026
3 checks passed
@bharvey88
bharvey88 deleted the feat/per-variant-repo branch July 20, 2026 15:46
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