Problem: the Oikos control room was browser-only — no native desktop
experience (system tray, notifications, keychain-persisted auth).
Change: add a Wails v3 thin-shell desktop app at cmd/desktop/ that embeds
the existing SPA in a webview. The Go side is ~380 lines — no bundled
server, no Postgres connection. It reads auth from the OS keychain,
injects it into the SPA on load, and the SPA talks HTTPS to the homelab
same as a browser.
Phase 1.0 — Scaffold + window:
- Embed web/dist/ into the Wails binary
- Inject window.__OIKOS_CONFIG__ with keychain-stored apiUrl + token
- 1400×900 window, min 1024×700
- System tray: Open/Quit, click toggles window
Phase 1.1 — Native shell:
- Poll /api/v1/dashboard/summary every 30s; osascript notification
when approvals or critical signals increase
- Save/restore window position to ~/.config/oikos/window.json
- EnableAutoStart/DisableAutoStart — macOS LaunchAgent plist
Phase 1.2 — Token management:
- Config.svelte calls window.wails.Call.ByName('SaveConfig') after
successful connection — persists to OS keychain
- ConfigService binds SaveConfig, ClearConfig, EnableAutoStart,
DisableAutoStart to the Wails runtime
Phase 1.3 — Auto-update:
- Poll Gitea releases API every 6h, compare semver, show dialog
- 'Check for Updates' tray menu item triggers immediate poll
Phase 1.4 — Distribution:
- macOS entitlements.plist: network client + keychain access
- .gitea/workflows/desktop.yml: CI builds macOS arm64 + Linux amd64
on 'desktop-*' / 'v*' tags, attaches artifacts to release
- Makefile: desktop (build), desktop-package (build + zip/tar.gz)
- CONTRIBUTING.md: documented desktop app + commands
Risk: low. Wails v3 alpha API may shift; the Go glue is ~380 lines and
trivially portable. The desktop app is additive — zero changes to the
existing server or SPA logic. No config mutation, no infrastructure
impact.
Verification: go build, go vet, go mod tidy all pass.
25 lines
528 B
Plaintext
25 lines
528 B
Plaintext
.DS_Store
|
|
__pycache__/
|
|
*.pyc
|
|
|
|
# Compiled binaries (Go rewrite — bin/oikos, bin/nomos)
|
|
bin/oikos
|
|
bin/nomos
|
|
oikos
|
|
webhook
|
|
|
|
backups/
|
|
.env
|
|
.infisical-credentials
|
|
|
|
# Web UI (Svelte 5) — build artifacts. The SPA is a standalone static build,
|
|
# deployed separately from the oikos binary (plans/2026-07-12-wails-desktop-app.md
|
|
# 0.1), so the output dir is just a build artifact.
|
|
web/dist/
|
|
web/node_modules/
|
|
|
|
# Wails desktop app — frontend copy for embedding
|
|
cmd/desktop/frontend/dist/
|
|
cmd/desktop/build/
|
|
cmd/desktop/oikos-desktop
|