Skip to content

feat(update): implement automatic version check with tray integration#27

Merged
flexiondotorg merged 4 commits intomainfrom
auto-update
Mar 23, 2026
Merged

feat(update): implement automatic version check with tray integration#27
flexiondotorg merged 4 commits intomainfrom
auto-update

Conversation

@flexiondotorg
Copy link
Copy Markdown
Member

Summary

Implements a complete automatic update mechanism for Sidra, enabling seamless version management and user notifications through the system tray. This implementation spans configuration setup, electron-updater integration, internationalization support, and build verification.

Changes

  • Configuration & Dependencies: Added electron-updater to package.json with secure version pinning and configured autoUpdate settings in electron config
  • Update Mechanism: Implemented autoUpdate.ts module with version checking, update availability detection, and graceful error handling
  • Tray Integration: Extended tray.ts with update notifications and user-triggered version checks from the system tray
  • Internationalization: Added comprehensive i18n translations for all update-related messages across UI components
  • Build System: Updated Nix flake.nix to include libxcrypt-legacy dependency for reproducible builds
  • Documentation: Added SPECIFICATION.md documenting the complete auto-update architecture and installation procedures

Technical Implementation

  • Uses electron-updater for robust cross-platform update delivery
  • Semantic versioning with package.json as canonical source
  • Non-blocking async update checks with tray context menu integration
  • Full i18n support for update notifications in all configured languages
  • Graceful fallback handling for update failures or network issues

Testing

  • Verify update check appears in tray context menu
  • Confirm version notifications display in system tray
  • Test update availability detection (mock or real update server)
  • Validate i18n translations in update notifications
  • Build verification on all target platforms (via Nix)

Related Issues

Implements automatic version checking and user-facing update notifications for improved user experience and security patching distribution.

…ation

- Add electron-updater ^6.8.3 as production dependency
- Configure GitHub release publishing in package.json build config
- Add AppImage artifact naming for Linux builds
- Add autoUpdate.enabled schema to config store with getter/setter
- Default auto-update to enabled when setting is absent

Signed-off-by: Martin Wimpress <code@wimpress.io>
…dates

- Add autoUpdate.ts module with platform detection for AppImage and NSIS
- Initialize auto-update process with download and install workflows
- Add i18n strings for downloading, ready, and failed update states
- Integrate auto-update into main.ts with fallback to manual checking
- Add ready state tracking to UpdateInfo interface
- Update tray menu to show "Restart to update" when update ready

Supports automated updates on AppImage (Linux) and NSIS (Windows)
platforms with user notifications and restart prompts via
electron-updater.

Signed-off-by: Martin Wimpress <code@wimpress.io>
… to build

- Add comprehensive Auto-update section to SPECIFICATION.md covering
  platform detection, lazy require constraints, CastLabs ECS
  compatibility, and config
- Document electron-updater constraints: lazy-require pattern, manifest
  filenames, code signing requirements, and AppImage artifactName format
- Update AGENTS.md i18n record count from 9 to 12 reflecting UPDATE_*
  text additions
- Add libxcrypt-legacy to flake.nix build dependencies for fpm Ruby
  compatibility on NixOS (resolves libcrypt.so.1 lookup failures in
  deb/rpm builds)

Signed-off-by: Martin Wimpress <code@wimpress.io>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 12 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/autoUpdate.ts">

<violation number="1" location="src/autoUpdate.ts:64">
P2: Interpolate `{version}` in the update notification title; it currently renders the placeholder literally.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

- Replace template placeholder in updateAvailable string with actual
  version
- Apply in both checkForUpdates (update.ts) and initAutoUpdate
  (autoUpdate.ts)

Signed-off-by: Martin Wimpress <code@wimpress.io>
@flexiondotorg flexiondotorg merged commit 5a09b5c into main Mar 23, 2026
11 checks passed
@flexiondotorg flexiondotorg deleted the auto-update branch March 23, 2026 15:40
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