Skip to content

fix: allow downgrade from nightly to stable by not overriding autoUpdater.allowDowngrade#2460

Open
shoaib050326 wants to merge 1 commit intopingdotgg:mainfrom
shoaib050326:issue-2340-branch
Open

fix: allow downgrade from nightly to stable by not overriding autoUpdater.allowDowngrade#2460
shoaib050326 wants to merge 1 commit intopingdotgg:mainfrom
shoaib050326:issue-2340-branch

Conversation

@shoaib050326
Copy link
Copy Markdown

@shoaib050326 shoaib050326 commented May 2, 2026

Summary

  • Removes the explicit allowDowngrade = false override for the stable
    update channel that prevented electron-updater from finding older
    stable releases as valid downgrades from nightly builds.
  • Simplifies the redundant allowDowngrade save/restore toggle around
    the channel-switch update check, since applyAutoUpdaterChannel
    now correctly preserves the channel setter's default true.
  • Adds a missing test: stable versions are accepted on the stable
    channel.

Root cause

applyAutoUpdaterChannel set autoUpdater.channel = channel (which
electron-updater auto-follows with allowDowngrade = true), then
immediately overrode it to channel === "nightly". For the "latest"
channel this forced allowDowngrade = false, blocking any stable
downgrade after a nightly install.

Risk

Low. The channel setter's allowDowngrade = true default is the
documented electron-updater behavior and is appropriate for both
channels. No other allowDowngrade assignments exist in the codebase.

Rollback

Revert this commit. No data migration needed.

Closes #2340


Note

Medium Risk
Changes Electron auto-update channel switching behavior, which can affect which releases are considered valid and how clients update/rollback. Risk is limited in scope but could impact update eligibility if electron-updater defaults differ across platforms.

Overview
Desktop auto-updater channel switching now preserves electron-updater’s allowDowngrade behavior instead of forcing it based on channel, enabling nightly installs to roll back to stable releases.

This removes the temporary allowDowngrade toggle around the channel-change update check and updates logging to report the effective autoUpdater.allowDowngrade. Adds a test to ensure stable versions are accepted on the latest channel.

Reviewed by Cursor Bugbot for commit 7f300a8. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix downgrade from nightly to stable by preserving autoUpdater.allowDowngrade

Previously, applyAutoUpdaterChannel in main.ts overrode autoUpdater.allowDowngrade based on the selected channel, and the SET_CLIENT_SETTINGS_CHANNEL handler temporarily forced it to true during channel-change update checks. This prevented stable versions from being installed when downgrading from nightly.

  • applyAutoUpdaterChannel no longer sets allowDowngrade; it only sets channel and allowPrerelease
  • The SET_CLIENT_SETTINGS_CHANNEL handler calls checkForUpdates('channel-change') directly without modifying allowDowngrade
  • A new test in updateChannels.test.ts verifies stable versions are accepted on the stable channel

Macroscope summarized 7f300a8.

…ater.allowDowngrade

Removes the explicit allowDowngrade = false override for the stable
channel in applyAutoUpdaterChannel that prevented electron-updater
from finding older stable releases as valid downgrades from nightly.

Also simplifies the redundant allowDowngrade save/restore toggle since
the autoUpdater.channel setter already defaults allowDowngrade = true.

Adds missing test for stable versions accepted on the stable channel.

Closes pingdotgg#2340
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: df0b60ad-6854-47d7-9b75-6633ea445ce6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions Bot added size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels May 2, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 2, 2026

Approvability

Verdict: Needs human review

This PR modifies the desktop app's auto-update downgrade behavior by removing explicit control of allowDowngrade. Changes to update mechanisms affect how users receive version updates and warrant human review to ensure intended behavior.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Can Never Switch out of Nightly Mode

1 participant