Issue for this PR
Closes #64649
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
The desktop updater turned on for any packaged build. electron-updater reads its feed from resources/app-update.yml, and distro packages that update the app themselves remove it (the AUR's opencode-desktop-bin does). Every check then failed with a raw ENOENT toast, and the background check logged the error at startup and every 10 minutes.
The updater now also needs app-update.yml to be present before it turns on. Without it, the updater stays in its existing disabled state, so electron-updater never loads. It logs once that it's disabled, and the app menu's "Check for Updates…" item is greyed out. Official builds are unaffected. electron-builder writes app-update.yml into resources for its auto-updatable targets (dmg/zip, NSIS, AppImage, deb, rpm), script/pack.ts writes it for --dir builds, and the official .deb ships it. A missing file is how packagers turn the updater off: an electron-builder maintainer recommends deleting it to disable auto-update for deb/rpm (electron-builder#8838). electron-updater 6.8.9's own isUpdaterActive() only checks app.isPackaged (plus APPIMAGE for AppImage), so it can't tell us this.
In Settings, the button for a disabled updater now reads "Updates unavailable", and the row says the build is updated outside OpenCode. A check that comes back disabled (for example the hidden check command) shows the same message in a toast instead of nothing. The new strings are in English only; other locales fall back to them.
No feature flag: this is a bug fix.
How did you verify your code works?
bun test src/updater and bun typecheck in packages/gui-plugins.
- Added a test that
updaterAction reports the disabled state as unavailable.
- Not run in a packaged Linux build.
Screenshots / recordings
None.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR