Skip to content

Commit 8c146d1

Browse files
committed
point desktop at local
1 parent c63c01e commit 8c146d1

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎apps/desktop/src/main.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { homedir } from "node:os";
2121
// ---------------------------------------------------------------------------
2222

2323
const DEFAULT_PORT = 14788;
24+
const DEV_SERVER_URL = process.env.EXECUTOR_DEV_URL || "http://executor-local.localhost:1355";
2425
const SERVER_STARTUP_TIMEOUT_MS = 30_000;
2526
const SETTINGS_DIR = join(homedir(), ".executor");
2627
const SETTINGS_PATH = join(SETTINGS_DIR, "desktop-settings.json");
@@ -345,6 +346,17 @@ const loadScope = async (scopePath: string): Promise<void> => {
345346

346347
mainWindow.setTitle(`Executor — ${basename(scopePath)}`);
347348

349+
if (isDev) {
350+
// In dev mode, the Vite dev server (via portless) handles both UI and API.
351+
// Just set the scope env var and load the dev URL.
352+
currentScope = scopePath;
353+
process.env.EXECUTOR_SCOPE_DIR = scopePath;
354+
addRecentScope(settings, scopePath);
355+
buildMenu();
356+
mainWindow.loadURL(DEV_SERVER_URL);
357+
return;
358+
}
359+
348360
// Show loading state
349361
mainWindow.loadURL(`data:text/html,${encodeURIComponent(loadingHTML(scopePath))}`);
350362

0 commit comments

Comments
 (0)