Skip to content

fix: run automatic update checks periodically#2709

Open
MohitGoyal09 wants to merge 5 commits into
AgentWrapper:mainfrom
MohitGoyal09:issue-2707-periodic-update-check
Open

fix: run automatic update checks periodically#2709
MohitGoyal09 wants to merge 5 commits into
AgentWrapper:mainfrom
MohitGoyal09:issue-2707-periodic-update-check

Conversation

@MohitGoyal09

Copy link
Copy Markdown

Fixes #2707.

User-visible impact

Long-running Agent Orchestrator instances now discover updates without requiring an app relaunch. Automatic update checks still run at launch and then repeat every hour while the desktop app remains open.

Background check and download failures remain silent and log-only, while errors from a user-triggered manual check still surface in the app.

What changed

  • Reuse one automatic-check path for the launch check and hourly timer.
  • Keep only one periodic timer and unref it so it cannot keep Electron alive.
  • Serialize automatic and manual checks so they cannot race over download behavior.
  • Keep automatic check and download errors out of the renderer, including errors from electron-updater's separate download promise.
  • Add regression coverage for cadence, disabled settings, retries, timer reuse, manual-check overlap, and late download failures.
  • Document periodic update checks in the desktop installation section.

Tests

  • git diff --check origin/main...HEAD
  • cd frontend && npx vitest run src/main/auto-updater.test.ts --config vite.renderer.config.ts (12 passed)
  • cd frontend && npm run typecheck

Documentation

README.md now notes that installed desktop builds check for updates on launch and periodically while the app is running.

Intentional omissions

  • Did not add an update cadence setting; the interval remains a fixed one-hour constant.
  • Did not include a screenshot because this changes background Electron behavior with no visual UI changes.
  • Did not change daemon APIs or update-settings persistence.

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.

Update check: also run periodically, not only on app launch

1 participant