feat(desktop): native one-click installer (Electron + embedded PGlite) + signing CI - #341
Merged
Conversation
…) + signing CI Adds a no-Docker desktop installer under `desktop/`: an Electron shell that bundles and supervises the existing middleware kernel + web-ui with an embedded Postgres (PGlite exposed over the wire protocol), an onboarding wizard, OS-keychain secret custody, tray, and auto-update. A separate `desktop-apps.yml` workflow builds + signs installers for macOS/Windows/Linux on a Release and uploads them. Small backward-compatible kernel seams (no fork): - harness-knowledge-graph-neon: graphPool honours GRAPH_POOL_MAX (default 5) so an embedded single-connection engine can cap the pool at 1. - config/index: kernel honours HOST (default `::`, unchanged) so a local install can bind loopback-only. - migrations: drop `CREATE EXTENSION pgcrypto` (only gen_random_uuid was used, core since PG13; PGlite has no pgcrypto). - copy-build-assets: mirror auth/routines/profile migrations + builder prompts into dist so a plain `npm run build` (not just the Dockerfile) is complete. Not yet CI-validated: the cross-platform installer build + macOS notarization run only locally on macOS so far; first signed Release run is the acceptance test.
This was referenced Jun 19, 2026
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.
What
A native, no-Docker one-click desktop installer for omadia under
desktop/. It's an Electron shell that bundles and supervises the existing middleware kernel and web-ui — no UI or kernel rewrite — plus an embedded Postgres (PGlite) so there's no database to install. First run shows an onboarding wizard (provider key, capabilities, data location, recovery key).A separate workflow (
.github/workflows/desktop-apps.yml) builds + signs installers for macOS / Windows / Linux on a published Release and uploads them as assets.How it works
The embedded DB speaks the Postgres wire protocol, so the kernel connects through its normal
pg/DATABASE_URLpath and runs all existing migrations unchanged.Kernel seams (small, backward-compatible — no fork)
GRAPH_POOL_MAX—harness-knowledge-graph-neoncaps the sharedgraphPool(default 5). The embedded engine is single-connection, so the installer sets1.HOST— the kernel listen address (default::, identical to the prior hard-coded bind). A local install sets127.0.0.1(loopback-only).CREATE EXTENSION pgcrypto; the only function used wasgen_random_uuid(), core since Postgres 13 (PGlite has no pgcrypto module).auth/routines/profileStorage/profileSnapshotsmigrations +builder/promptsintodist, so a plainnpm run build(not only the Dockerfile) produces a completedist.Signing CI
desktop-apps.yml(matrix macOS/Windows/Linux): build middleware + web-ui → rebuild middleware native modules for Electron's ABI (@electron/rebuild) → stage → electron-builder → upload to the Release. Signing is fail-soft (unsigned artifacts ship without secrets).omadia-uiflow (same*_HIGH5Apple secrets): keychain import before packaging,afterPacksigns nested native modules, electron-builder notarizes,notarytool+stapleron the DMG, verify gate rejects ad-hoc.WINDOWS_CSC_*).Secrets must be added to this repo's Actions secrets before signed builds work.
Validation
/health200) → web-ui → admin UI, with the UI proxying to the kernel correctly.Notes for reviewers
pull_requestCI exercises the middleware build/tests with the four kernel seams above.desktop-apps.ymltriggers on Release published (+workflow_dispatch), not on this PR.