Make release notes follow the selected firmware variant's repo#21
Conversation
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)
|
Warning Review limit reached
Next review available in: 33 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
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:
reposmap in devices.json mirroringfirmware/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.repoFor(device, channel, variant)resolver in device.js that falls back todevice.repo. The release-notes box, its Full-release/recent-releases links, and the USB-fallback "latest release" link route through it.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.pygreen against the live registry.🤖 Generated with Claude Code