Repository navigation
fix(updates): let a release candidate's manual check see newer RCs - #1448
Conversation
releases/latest only resolves to a stable release, so an RC compared itself against the last stable, found it older, and said up to date while the next RC was live. On a prerelease, read the release list and compare against the newest entry, stable or not. Stable installs keep reading releases/latest. Fixes #1447
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Select and validate releases electron/update-checker.ts, electron/update-checker.test.ts |
Prerelease checks fetch and validate a releases list, then select its highest semantic-version release. Stable checks continue to validate the latest stable release. Tests cover RC updates and invalid list responses. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant checkLatestRelease
participant GitHubReleasesAPI
participant newestRelease
participant asRelease
alt Current version is a prerelease
checkLatestRelease->>GitHubReleasesAPI: Request releases list
GitHubReleasesAPI-->>checkLatestRelease: Return release list
checkLatestRelease->>newestRelease: Validate entries and select highest semver
newestRelease->>asRelease: Validate release payloads
asRelease-->>newestRelease: Return validated releases
newestRelease-->>checkLatestRelease: Return newest release
else Current version is stable
checkLatestRelease->>GitHubReleasesAPI: Request latest release
GitHubReleasesAPI-->>checkLatestRelease: Return latest release
checkLatestRelease->>asRelease: Validate stable release payload
asRelease-->>checkLatestRelease: Return validated release
end
Possibly related PRs
- getopenscreen/openscreen#1425: Adds the background update flow; this change updates the manual check path that supplies its release comparison.
Suggested reviewers: arhxam
Merge Risk: 
Minimal · up to 5c9b8
-
Prerelease checks now consider newer RCs and superseding stable releases, while stable checks retain their existing endpoint. No actionable merge-blocking issue was established; the change is mergeable subject to normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title names the fix and the affected behavior: a release candidate's manual update check now detects newer RCs. The raw summary and objectives both describe prerelease manual checks reading the releases list, so the title matches the main change. It is specific and follows conventional commit style.
Full details: Description check
-
Explanation
The description covers the problem, the fix, and the tests. It describes the bug (
#1447), the prerelease and stable behavior split, and test coverage with results. It includes the "Fixes#1447" reference. The template sections for Type of change, Release impact, Desktop impact, and Screenshots are not filled in. The Testing section is brief and gives no commands. Those omissions are non-critical for a bug fix, so the description is mostly complete.
Full details: Linked Issues check
-
Explanation
Issue
#1447requires manual checks on prerelease installs to consider newer prereleases and stable releases, while stable installs continue to usereleases/latest.checkLatestReleasedetects a prerelease version, fetchesreleases?per_page=30, validates the release entries, selects the highest semver release, and keeps the existing release-URL validation. Stable versions still usereleases/latest. The added tests cover a newer RC, a superseding stable release, the newest RC, and invalid list responses.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 2 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Problem
On a release candidate, Check for Updates said "up to date" while a newer RC was published (#1447). It read
releases/latest, which GitHub resolves to the latest stable only. Seen in the v2.2.0-rc.1 → rc.2 e2e on macOS and Windows.Fix
releases?per_page=30and compare against the newest entry, stable or prerelease. That entry is either the next RC or the stable release that supersedes it.releases/latest.Tests
electron/update-checker.test.ts: next RC offered, superseding stable offered, current on the newest RC, and empty, non-list and draft responses rejected. 23/23 pass, and Biome is clean.Fixes #1447
🤖 Generated with Claude Code
Summary by CodeRabbit