From e839c84bf0a2f4ed3130992e4ea1029edcdd3ef0 Mon Sep 17 00:00:00 2001 From: JakeBreath Date: Sun, 20 Sep 2026 17:34:01 -0500 Subject: [PATCH] Make the desktop smoke test mode-aware The dev path (J621_DEV_SERVER) has the Vite origin and no /setup screen, so the expectations now follow the mode instead of reporting false failures. --- desktop/README.md | 3 ++- desktop/src/main.ts | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/desktop/README.md b/desktop/README.md index 29d7946..59576d1 100644 --- a/desktop/README.md +++ b/desktop/README.md @@ -82,7 +82,8 @@ updates without elevation. and checks that the bundled SPA loads over `app://j621`: the SPA fallback, an asset fetch, `localStorage`, OPFS, WebCodecs and the preload bridge. It exits non-zero on failure. With `J621_UPDATE_URL` set it also checks that the feed -reports the expected version. +reports the expected version. Pointing `J621_DEV_SERVER` at the Vite dev +server checks the development path instead of the bundled one. ## Backend CORS diff --git a/desktop/src/main.ts b/desktop/src/main.ts index efaeb65..a8bea2c 100644 --- a/desktop/src/main.ts +++ b/desktop/src/main.ts @@ -444,12 +444,14 @@ function runSmokeTest(win: BrowserWindow): void { })()`, true)) as Record; const expected: Record = { - origin: APP_ORIGIN, + // In dev the window hosts the Vite dev server, which has no /setup + // screen (the SPA only asks for a backend in production builds). + origin: DEV_SERVER || APP_ORIGIN, title: "J621", assetOk: true, routeOk: true, mounted: true, - setupOk: true, + setupOk: !DEV_SERVER, storageOk: true, historyOk: true, opfsOk: true,