🖥️ Electron Desktop — Code Review Hardening (16 Fixes)
🔴 Critical (3)
- Server readiness — Window now waits for health check before loading URL; no more blank screens on cold start
- Restart timeout —
restart-serverIPC handler has 5s timeout + SIGKILL to prevent hangs - Port change lifecycle —
changePort()now stops/restarts server on the new port
🟡 Important (4)
- Tray cleanup — Destroy old Tray before recreating (no more duplicates/leaks)
- IPC event emission — Main process now emits
server-status&port-changedevents - Listener accumulation — Disposer pattern replaces
removeAllListeners - useIsElectron performance —
useSyncExternalStoreeliminates 5x re-renders
🔵 Minor (9)
- Removed dead code (
isProduction,omniroute://protocol) - Platform-conditional
titleBarStyle(macOS only) stdio: pipefor logging + readiness detection- Shared
AppInfotype,useDataDirerror state - Version sync, CSP headers, simplified preload wrappers
🧪 Tests
- 76 tests across 15 suites (up from 64/9)
- New: server readiness, restart timeout, CSP, platform options, disposer pattern