Skip to content

feat(desktop): download updates on their own and offer Update and restart in the tray - #595

Merged
linroid merged 2 commits into
mainfrom
feat/desktop-auto-update
Oct 18, 2026
Merged

linroid merged 2 commits into
mainfrom
feat/desktop-auto-update

Conversation

@linroid

@linroid linroid commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Auto-download: while automatic checks are on ([desktop] checkForUpdates), a check that finds a release downloads its installer right away; the toast now comes once it's ready (Restart). If the download fails, the old Update / What's new toast shows, and the next day's check tries the download again. With checks off, Settings still asks before downloading.
  • Tray menu: once an update is ready, Update and restart shows right after Show Ketch (Install update… where Ketch opens the installer instead), via MenuAction.InstallUpdate. Strings are added in all 10 languages.
  • Install on start: a finished download is saved to updates/ready-update.properties (ReadyUpdate). The next plain launch installs it from main() before anything else starts (installDownloadedUpdate), and the installer opens the app again. A hidden launch (login item, browser extension), a launch that brings files or links, or an installer the user has to finish just offers the update again. After an install that didn't take (pending-install is still there), it isn't tried again.

Testing

  • ./gradlew :app:desktop:test: new DesktopUpdaterTest cases cover auto-download, retrying a failed download, saving and restoring the ready update, and installDownloadedUpdate. DesktopTrayModelTest covers the tray item.
  • Localization and hardcoded-text checks in :app:shared:jvmTest pass.
  • Not checked: a real update in a packaged build. The tray menu is a native menu, so the snapshot harness can't render it and there are no snapshots.

…tart in the tray

Automatic checks now download the installer as soon as they find a release.
Once it is ready, the tray menu offers Update and restart (Install update…
where the app opens the installer). A download not installed is saved and
installed by the next plain launch, before anything starts; hidden launches
and launches with files or links offer it again instead.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T07:54:30.062756Z c84bede PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c84bede5ec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

 2 191 files  ± 0   2 219 suites  ±0   57m 47s ⏱️ -13s
15 194 tests +12  14 926 ✅ +12  268 💤 ±0  0 ❌ ±0 
18 543 runs  +12  18 275 ✅ +12  268 💤 ±0  0 ❌ ±0 

Results for commit 31473e3. ± Comparison against base commit 4e6c7ae.

This pull request removes 1 and adds 13 tests. Note that renamed tests count towards both.
com.linroid.ketch.app.desktop.DesktopUpdaterTest ‑ automaticCheck_newerRelease_postsAToastOnceADay
com.linroid.ketch.app.desktop.DesktopTrayModelTest ‑ trayMenu_updateDownloaded_offersToInstallItAfterShowKetch
com.linroid.ketch.app.desktop.DesktopUpdaterTest ‑ automaticCheck_downloadFailure_offersTheReleaseAndTriesAgainNextDay
com.linroid.ketch.app.desktop.DesktopUpdaterTest ‑ automaticCheck_newerRelease_downloadsItAndPostsAToastOnceReady
com.linroid.ketch.app.desktop.DesktopUpdaterTest ‑ check_whileCheckingAutomatically_downloadsTheRelease
com.linroid.ketch.app.desktop.DesktopUpdaterTest ‑ download_savesTheUpdateUntilItIsInstalled
com.linroid.ketch.app.desktop.DesktopUpdaterTest ‑ installDownloadedUpdate_afterAnInstallThatDidNotTake_doesNotTryAgain
com.linroid.ketch.app.desktop.DesktopUpdaterTest ‑ installDownloadedUpdate_failure_keepsTheUpdateForTheAppToOffer
com.linroid.ketch.app.desktop.DesktopUpdaterTest ‑ installDownloadedUpdate_installerTheUserFinishes_leavesItToStart
com.linroid.ketch.app.desktop.DesktopUpdaterTest ‑ installDownloadedUpdate_installsItAndRecordsTheInstall
com.linroid.ketch.app.desktop.DesktopUpdaterTest ‑ installDownloadedUpdate_nothingDownloaded_doesNothing
…

@linroid
linroid merged commit bd4acee into main Oct 18, 2026
14 checks passed
@linroid
linroid deleted the feat/desktop-auto-update branch October 18, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant