From 56db0394a7763acfe701dc9dd47e9062b361cead Mon Sep 17 00:00:00 2001 From: ciregenz Date: Sun, 19 Jul 2026 18:52:46 -0700 Subject: [PATCH] [eric] dev: OPENSWARM_DEV_PORT overrides the dev webpack port so parallel worktrees don't collide on :3000 --- electron/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electron/main.js b/electron/main.js index 87c6a258..9afcb2d5 100644 --- a/electron/main.js +++ b/electron/main.js @@ -1209,7 +1209,8 @@ function createWindow() { }); if (isDev) { - mainWindow.loadURL(`http://localhost:3000`); + // Dev only: OPENSWARM_DEV_PORT lets a second worktree's Electron point at its own webpack-dev-server (default 3000) instead of colliding on the shared port. Packaged builds never hit this branch. + mainWindow.loadURL(`http://localhost:${process.env.OPENSWARM_DEV_PORT || 3000}`); } else if (frontendServerPort) { mainWindow.loadURL(`http://127.0.0.1:${frontendServerPort}/index.html`); } else {