Skip to content

feat: desktop app — health monitoring, process management, first-launch#20

Merged
jayzalowitz merged 2 commits into
mainfrom
jayzalowitz/desktop-electron
Apr 5, 2026
Merged

feat: desktop app — health monitoring, process management, first-launch#20
jayzalowitz merged 2 commits into
mainfrom
jayzalowitz/desktop-electron

Conversation

@jayzalowitz

Copy link
Copy Markdown
Owner

Summary

  • Health monitoring every 5s with tray icon color changes (green = healthy, yellow = degraded, red = failed)
  • Exponential backoff on restart (1s → 30s), 5 failures in 5min triggers alert dialog
  • Pause/Resume Twin from tray menu — stops worker polling while keeping API alive
  • Window state persistence — size, position, and maximized state saved across sessions
  • First-launch dependency check — guides users through CockroachDB installation
  • Graceful shutdown — SIGTERM with 5s timeout then SIGKILL, no orphaned processes
  • About panel — version, uptime, service status from tray menu
  • IPC API for launch-at-login and pause/resume from web UI

Closes #13

Test plan

  • tsc --noEmit — desktop TypeScript compiles clean
  • pnpm test — all 432 existing tests pass
  • Manual: launch desktop app, verify splash → main window transition
  • Manual: kill API process, verify tray turns yellow then green after restart
  • Manual: kill API 5 times rapidly, verify tray turns red with alert dialog
  • Manual: Pause Twin → verify worker stops → Resume Twin → verify worker restarts
  • Manual: close and reopen window, verify position/size restored

🤖 Generated with Claude Code

…rst-launch

- Health monitoring every 5s with tray icon color changes (green/yellow/red)
- Exponential backoff on restart (1s → 2s → 4s → 8s → 16s → 30s)
- 5 failures in 5 minutes marks service as failed with alert dialog
- Pause/Resume Twin from tray menu (stops/starts worker)
- Window position and size persistence via electron-store
- First-launch dependency check with install guidance dialog
- Graceful shutdown with 5s SIGTERM → SIGKILL fallback
- About panel showing version, uptime, and service status
- IPC channels for launch-at-login and pause/resume from web UI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace string-interpolated exec() calls with execFile() and
path.join() so resourcePath values with spaces or shell
metacharacters are handled safely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jayzalowitz jayzalowitz added the copilot Built with AI copilot label Apr 5, 2026
@jayzalowitz jayzalowitz merged commit fb5c2ea into main Apr 5, 2026
1 check passed
jayzalowitz added a commit that referenced this pull request May 5, 2026
Picks up the P1/P2 findings deferred from #154 (the hardening pass).
6 of the remaining UX review findings closed.

Settings cleanup (P1 #7, #9)
- Theme switcher relocated from page header (where it looked like a
  breadcrumb pill) to a dedicated "Visual theme" card in Settings.
- AI provider section now titled "AI brain — needed for Chat
  (optional otherwise)" instead of just "(optional)" — the Chat
  feature requires it, the old title was misleading.

Chat → Settings deep-link (P1 #9)
- When POST /messages returns 409 "no AI provider configured", the
  chat bubble explains the dependency + footer link to Settings →
  AI brain. Previously the user got "No AI provider configured"
  with no path forward.

Onboarding modal dimmer (P2 #15)
- Bumped overlay rgba(0,0,0,.85) → .92 + backdrop-filter: blur(4px)
  so the sidebar/page behind the modal is properly muted (was
  bleeding through the glass effect at .85).

Console error spam reduction (P2 #20)
- New isApiKnownOffline() in api-client.js. Badge-poll loop in
  app.js backs off 10s → 60s when API is known down. Pre-fix
  produced 110+ console errors/min against a dead server.

Date input theming on Audit (P1 #11)
- New .themed-date class so native date inputs match the dark glass
  aesthetic (background, border, color-scheme for picker icon).
- Webkit calendar-picker-indicator filter inverts the icon glyph
  on dark themes so it's actually visible.

Tests: no new unit tests (browser-only). Backend suite still green
across 40 packages.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot Built with AI copilot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop Electron app: native install, tray, process management

1 participant