CodeNomad/packages/electron-app
Pascal André 0bab9e3438
fix(restore): simplify persistence and harden cross-platform cleanup (#602)
## Summary

- Follow up #578 by consolidating desktop persistence, restore
reconciliation, lifecycle coordination, and regression coverage.
- Preserve active drafts and attachments, request-scoped workspace
ownership, deletion tombstones, renderer authority, and bounded shutdown
behavior.
- Fix the reported macOS cleanup failure with targeted BSD process
queries and random-token-guarded process-group cleanup, without an
unverified PID fallback.

## Platform hardening

- Ignore development renderer origins in packaged Electron builds.
- Preserve staged Tauri navigation authority and handle confirmed
Windows session-end shutdown on the UI thread.
- Bound workspace launch preflight, runtime startup, and health
readiness.
- Retain cleanup ownership after unexpected leaders exit and verify
portable POSIX descendants by immutable identity or inherited launch
token.
- Add real Darwin-only process-group integration tests for macOS CI.

## Scope

- 96 files changed.
- 6,295 additions and 12,167 deletions, a net reduction of 5,872 lines
from the merged implementation.
- Consolidated duplicated tests while retaining focused race,
durability, cleanup, and platform contracts.

## Validation

- pm run typecheck
- pm run typecheck --workspace @neuralnomads/codenomad
- Electron native suite: 60 passed
- Tauri suite: 49 passed
- Focused server lifecycle/identity suite: 31 passed, 2 Darwin-only
skipped on Windows
- Focused UI restore/codec/reconciliation suite: 36 passed
- Broader server suite: 59 passed, 3 platform skips
- Broader UI suite: 97 passed, 1 skip; 2 Node 25 solid-toast loader
failures reproduced on the merged baseline
- git diff --check
- Final limited gatekeeper: PASS for server/macOS, UI restore, and
Electron/Tauri
2026-07-17 22:17:15 +01:00
..
electron fix(restore): simplify persistence and harden cross-platform cleanup (#602) 2026-07-17 22:17:15 +01:00
scripts Reduce App package sizes (#453) 2026-05-15 19:13:13 +01:00
.gitignore build: bundle node runtime for desktop packages 2026-05-04 20:08:04 +01:00
electron.vite.config.ts Reduce App package sizes (#453) 2026-05-15 19:13:13 +01:00
package.json fix(restore): simplify persistence and harden cross-platform cleanup (#602) 2026-07-17 22:17:15 +01:00
README.md Update Readmes 2025-11-21 12:37:24 +00:00
tsconfig.json fix(desktop): bundle CLI resources and request mic access 2026-03-28 15:30:14 +00:00

CodeNomad App

This package contains the native desktop application shell for CodeNomad, built with Electron.

Overview

The Electron app wraps the CodeNomad UI and Server into a standalone executable. It provides deeper system integration, such as:

  • Native window management
  • Global keyboard shortcuts
  • Application menu integration

Development

To run the Electron app in development mode:

npm run dev

This will start the renderer (UI) and the main process with hot reloading.

Building

To build the application for your current platform:

npm run build

To build for specific platforms (requires appropriate build tools):

  • macOS: npm run build:mac
  • Windows: npm run build:win
  • Linux: npm run build:linux

Structure

  • electron/main: Main process code (window creation, IPC).
  • electron/preload: Preload scripts for secure bridge between main and renderer.
  • electron/resources: Static assets like icons.