Conversation
…e support - Add autoCheckUpdates field to AppSettings schema with Prisma migration - Implement full semver 2.0 comparison with prerelease support (alpha, beta, rc) - Create IPC handlers for autoCheckUpdates with comprehensive test coverage (92%) - Migrate Angular UpdateService from localStorage to database - Refactor UpdateService to remove async constructor operation (SonarQube compliance) - Update all tests for new async initialization pattern - Coverage: Angular 93.9%, Electron 63.45%, new code 92-100% - Quality gate: PASSED (1213 tests passing)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR migrates the
autoCheckUpdatespreference from localStorage to the database and implements full semver 2.0 comparison with prerelease support, fixing version update detection for alpha releases.Goal
autoCheckUpdatespreference to database for consistency with app architectureKey Changes
autoCheckUpdatesfield to AppSettings schema with Prisma migrationType of Change
Impact Assessment
Database Impact
Migration Details:
autoCheckUpdatesboolean field toAppSettingstabletruefor new installationsBackup Impact
Impact Details:
autoCheckUpdatespreferenceTesting
How Has This Been Tested?
Test Results:
Test Steps
npm install+npx prisma migrate devnpm run test:electronandnpm testnpm run sonar:checknpm run devTest Configuration
UI Changes
No UI changes included in this PR. Functionality remains the same from user perspective.
Checklist
npm run lintand fixed any issuesnpm testand all tests passnpm run test:electronand all tests passnpm run sonar:checkand the analysis passesBreaking Changes
No breaking changes. The migration is backward compatible.
Related Issues
Related to previous SmartScreen fix (PR #61)
Additional Context
Key Implementation Details:
Semver Comparison: Implemented
parseVersion()andcomparePrereleases()helpers that fully support semver 2.0 specification with proper precedence: release > rc > beta > alphaDatabase Migration: Created Prisma migration
20260211084714_add_auto_check_updates_to_app_settingswith proper defaults and updated template.dbIPC Architecture: New handlers in
auto-check-updates-handlers.tswith comprehensive error handling and fallback totrueon errorsSonarQube Compliance: Refactored UpdateService to avoid async operations in constructor, using explicit
init()method patternTest Coverage: Added extensive test coverage for:
Reviewer Notes
Please pay special attention to:
electron/src/services/update/update.service.tsAll quality gates passed: 1,213 tests, 93.9% Angular coverage, SonarQube quality gate PASSED.