fix: bundle the Electron preload so the sandboxed bridge loads in packaged builds (v2.0.1)

The preload script imported ../shared/ipc at runtime; sandboxed preloads cannot
require local modules, so window.eveflow was never exposed in the installed app
and every request fell back to browser fetch (Failed to fetch, LOCALHOST metrics).
Main and preload are now bundled with esbuild into single files in dist-electron/.

Also: explicit error banner when the bridge is missing inside Electron, and a more
precise connection test message (transport path, capabilities status).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Wn5VX9HNbJ7N54hR24u9Y
This commit is contained in:
Claude committed 2026-09-03 15:38:36 +00:00
1 parent e3d5ead652
commit c73114eb0d
7 files changed
+524 -10

No files matched your search

+6 -4
View File
@@ -1,22 +1,23 @@
{
"name": "eveflow",
"version": "2.0.0",
"version": "2.0.1",
"description": "JARVIS-style desktop HUD for Hermes Agent: voice, streaming runs, scheduled jobs, skills and telemetry",
"main": "dist-electron/electron/main.js",
"main": "dist-electron/main.js",
"private": true,
"license": "MIT",
"scripts": {
"dev": "vite --host 127.0.0.1 --port 5173 --strictPort",
"build": "npm run typecheck && npm run build:renderer && npm run build:electron",
"build:renderer": "vite build",
"build:electron": "tsc -p tsconfig.electron.json",
"build:electron": "node scripts/build-electron.mjs",
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.electron.json --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"electron": "electron .",
"start": "npm run build:electron && concurrently -k -s first \"npm run dev\" \"wait-on http://127.0.0.1:5173 && cross-env NODE_ENV=development VITE_DEV_SERVER_URL=http://127.0.0.1:5173 electron .\"",
"preview": "vite preview",
"dist": "npm run build && electron-builder --win --publish never"
"dist": "npm run build && electron-builder --win --publish never",
"typecheck:electron": "tsc -p tsconfig.electron.json --noEmit"
},
"build": {
"appId": "com.romik3.eveflow",
@@ -70,6 +71,7 @@
"cross-env": "^10.0.0",
"electron": "^44.1.1",
"electron-builder": "^26.15.3",
"esbuild": "^0.28.2",
"jsdom": "^30.0.1",
"typescript": "^5.9.3",
"vite": "^8.2.2",