Skip to content

Conversation

@altaskur
Copy link
Owner

@altaskur altaskur commented Feb 5, 2026

Description

Implements automatic update handling using electron-updater, including startup checks, user notification, controlled download/install flow, and silent install on restart while preserving local data.

Goal

Reduce friction for users by enabling in-app updates from GitHub Releases with a clear UI flow and safe background installation.

Key Changes

  • Added Electron update manager and IPC handlers to check, download, and install updates via electron-updater.
  • Added UI for update notifications and settings (auto-check toggle, manual check, update dialog).
  • Integrated preload API and renderer service with signals and event handling.
  • Added translations and comprehensive unit tests for Electron and Angular update flows.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • ✅ Test updates
  • 🎨 Style/UI changes
  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🔧 Build/configuration changes

Impact Assessment

Database Impact

  • No database changes
  • New migration(s) included
  • Existing data migration required

Backup Impact

  • No impact on backups
  • Backup format changed
  • Restore compatibility maintained

Testing

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual testing
  • Tested with SonarQube analysis

Test Steps

  1. Run npm run test:electron
  2. Run npm test
  3. Launch app, open Settings -> Updates, trigger "Check for updates"

Test Configuration

  • Node version:
  • npm version:
  • Platform tested: Windows

UI Changes

Before

  • No in-app update UI or settings.

After

  • Settings page includes update controls.
  • Update dialog shown when a new version is available.

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • [x ] New and existing unit tests pass locally with my changes
  • [x ] I have run npm run lint and fixed any issues
  • [ x] I have run npm test and all tests pass
  • [x ] I have run npm run test:electron and all tests pass
  • [x ] I have run npm run sonar:check and the analysis passes
  • Any dependent changes have been merged and published

Breaking Changes

  • This PR contains breaking changes

Related Issues

Closes #
Related to #40

Additional Context

Updates are delivered from GitHub Releases and installed silently on restart, preserving local SQLite data, backups, and config.

Reviewer Notes

Please focus on the update flow: startup check, user notification, manual download/install, and restart behavior.

Install electron-updater package to enable automatic app updates from GitHub Releases.

Refs #40
Add UpdateInfo, UpdateSettings, DownloadProgress, and UpdateResult

interfaces for type-safe update handling between main and renderer.

Refs #40
Create UpdateManager class to handle electron-updater lifecycle events

and IPC handlers for communication between main and renderer processes.

Supports check, download, install operations and settings management.

Refs #40
Initialize UpdateManager on app ready and expose update API

through preload script. Add 'Check for Updates' menu item.

Refs #40
Implement UpdateService with signals to manage update state,

event listeners, and operations (check, download, install, settings).

Includes comprehensive unit tests with Jasmine.

Refs #40
Create OpenUpdateDialog for displaying update notifications

and OpenSettingsUpdates page for managing auto-check preferences.

Includes unit tests for both components.

Refs #40
Initialize UpdateService on app startup, add update dialog to layout,

and register settings page route for /settings/updates.

Refs #40
Add English and Spanish translations for update dialog, settings page,

menu items, and all update-related UI messages.

Refs #40
Add UpdateService mock to TestBed configurations in app.spec.ts

and component tests to ensure proper dependency injection.

Refs #40
Update workspace settings to exclude update service from coverage.

Refs #40
Add security features to prevent potential tabnabbing attack

when opening external links in fallback scenario.

Refs #40
@altaskur altaskur linked an issue Feb 5, 2026 that may be closed by this pull request
3 tasks
@altaskur altaskur merged commit adee244 into develop Feb 5, 2026
4 checks passed
@altaskur altaskur deleted the feature/automatic-updates-electron-updater branch February 6, 2026 21:14
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.

[Feature]: Automatic updates with electron-updater

1 participant