Skip to content

fix: don't let un-updateable builds check for an update#1808

Open
nmggithub wants to merge 4 commits intopingdotgg:mainfrom
nmggithub:make-local-builds-unupdatable
Open

fix: don't let un-updateable builds check for an update#1808
nmggithub wants to merge 4 commits intopingdotgg:mainfrom
nmggithub:make-local-builds-unupdatable

Conversation

@nmggithub
Copy link
Copy Markdown
Contributor

@nmggithub nmggithub commented Apr 7, 2026

What Changed

This stops our updater from trying to update when we don't have a usable feed.

Why

When local builds would try and update, users would get errors like the below:
image

This is because they don't have an update feed built into them. This PR disables our auto-updater when we don't have a feed. We should maybe upstream (to Electron Updater) better checks so errors like the above don't leak into consumer (our) code.

UI Changes

N/A

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Changes updater enablement logic and initialization order, which could unintentionally disable updates or alter update behavior across packaged builds. Scope is limited to desktop auto-updater gating and messaging.

Overview
Prevents desktop builds without a configured update feed from attempting update checks. getAutoUpdateDisabledReason now requires hasUpdateFeedConfig and returns a clear disabled reason when no feed exists, and both the menu-driven “Check for Updates” flow and auto-update enablement consult this flag.

configureAutoUpdater is reordered so feed URL overrides (GitHub token/private feed and mock update server) are applied before computing whether updates are enabled, ensuring the updater is only configured and scheduled when a valid feed is present. Tests are updated/expanded to cover the new feed-required behavior.

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

Note

Fix update checks to require a configured update feed before offering updates

  • getAutoUpdateDisabledReason in updateState.ts now accepts a hasUpdateFeedConfig boolean and returns a "no update feed is configured" reason when neither app-update.yml nor the mock env var is present.
  • Both handleCheckForUpdatesMenuClick and shouldEnableAutoUpdates in main.ts compute hasUpdateFeedConfig and pass it through, so builds without a feed show the "Updates unavailable" dialog instead of attempting a check.
  • configureAutoUpdater reorders feed URL setup (GitHub token / mock URL) to run before evaluating shouldEnableAutoUpdates, ensuring feed config is in place when the check runs.
  • Behavioral Change: packaged builds with no app-update.yml and no mock env now report auto-updates as disabled rather than silently attempting an update check.

Macroscope summarized 802d85f.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 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: 8af6ea25-1b9b-45cc-af2c-f9e2cddc10fa

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:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Apr 7, 2026
@zortos293
Copy link
Copy Markdown
Contributor

Some people are annoying because they build their own version and then complain that they can’t update it.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6763cb6. Configure here.

}): string | null {
if (!args.hasFeedURL) {
return "Automatic updates are not available because no update feed URL is configured.";
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feed URL check precedes more fundamental dev/packaged checks

Medium Severity

The hasFeedURL check is ordered before the isDevelopment and isPackaged checks. This causes development and unpackaged builds, which typically lack a feed URL, to display the less accurate "no update feed URL is configured" message instead of "only available in packaged production builds." Tests currently mask this behavior.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6763cb6. Configure here.

@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp bot commented Apr 7, 2026

Approvability

Verdict: Needs human review

This is a targeted bug fix preventing update checks on builds without update feeds. There's an unresolved review comment about the order of condition checks causing less accurate error messages for dev builds - worth addressing before merging.

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

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants