OTA Updates & Release Flow
Relevant source files
The following files were used as context for generating this wiki page:
The OTA Updates & Release Flow system provides a seamless mechanism for delivering software improvements and security patches to the J.A.R.V.I.S. desktop application. This system ensures that the "Private Control Room" remains up-to-date by leveraging background update checks, integrated download progress tracking, and user-notified installations.
This feature is built upon a standard Electron distribution stack, utilizing electron-builder for multi-platform packaging and electron-updater for managing the lifecycle of "Over-The-Air" (OTA) updates. The release flow is tightly integrated with GitHub Releases, serving as the primary publishing provider.
Sources: instructions/Installer & Auto-Updater_implementation_plan.md, src/main.ts:168-181
## Packaging & Build Pipeline
The release flow begins with a multi-stage build process that bundles the Electron frontend, the backend service, and the required runtime dependencies.
### Automated Build Scripts
The project utilizes Bun as the primary orchestrator for the build pipeline. The script scripts/build.ts performs the following operations:
- Compiles
main.ts(Node target) andpreload.tsinto CommonJS bundles. - Compiles
renderer.tsxinto an ESM browser bundle. - Inlines shared design tokens into the final CSS.
- Bundles the local backend service (
backend/src/cli.ts) into a standalone ESM bundle.
Sources: scripts/build.ts:14-63
### Electron-Builder Configuration
The application is packaged using electron-builder, configured via package.json. The configuration defines artifacts for Windows (NSIS) and specifies extraResources such as the bundled backend and a portable Bun runtime.
| Parameter | Configuration Value |
|---|---|
| App ID | org.jarvis.desktop |
| Product Name | Jarvis-Glas |
| Provider | github |
| Artifact Name | JARVIS-Setup-${version}.${ext} |
| NSIS Type | Assisted (not one-click), allows directory change |
Sources: package.json:20-65
## Update Lifecycle Management
Updates are managed by the autoUpdater in the main process, which monitors the release channel and communicates status changes to the renderer via IPC.
### Update Orchestration Flow
The autoUpdater is initialized in main.ts with configurations to force dev update checks and enable automatic downloads.
The diagram shows the transition from the initial update check to the final installation triggered by the user.
Sources: src/main.ts:168-228
### Core Update Functions
setupAutoUpdater(): Initializes listeners forchecking-for-update,update-available,download-progress, andupdate-downloaded.broadcastUpdaterState(): Sends the current status, progress percentage, and error details to all open windows.jarvis:quit-and-installIPC Handler: Allows the UI to trigger the installation of a previously downloaded update.
Sources: src/main.ts:153-242
## UI Integration & User Experience
The "Private Control Room" provides visual feedback for the update process through a dedicated banner in the sidebar.
### Renderer Update Interface
The renderer process listens for the jarvis:updater-state event. When an update is available or downloaded, it reveals the updater-banner located under the "Gateway ready" status in the sidebar.
| Status | UI Representation | User Action |
|---|---|---|
available | Banner visible: "Update verfügbar" | Wait for download |
downloading | Banner visible: "Update wird geladen (X%)" | None (background) |
downloaded | Banner visible: "Update bereit — neu starten?" | Click "Neu starten" |
error | Banner hidden | Check logs |
Sources: src/renderer.tsx:1620-1658, src/index.html:70-74
### Manual Controls
A manual update check can be triggered via the jarvis:check-for-updates IPC handler, which returns the status and a boolean indicating if an update is available.
Sources: src/main.ts:223-230
## Release Distribution
The project follows a specific workflow for generating final release artifacts.
This sequence illustrates how a developer moves from local code to a public release accessible by the auto-updater.
Sources: CONTRIBUTING.md:15-20, package.json:16
The OTA Updates & Release Flow ensures a reliable and non-intrusive update experience. By combining background downloads with explicit user consent for installation, the system maintains the integrity of the "Private Control Room" while keeping it at the forefront of development.
Sources: instructions/Installer & Auto-Updater_implementation_plan.md, src/main.ts:232-242