Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(ci): run LAN browser journeys on the Electron runner

vastsaeb3d2cfd787b
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d96c93bf4..72aabdc3d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -192,6 +192,11 @@ jobs:
- name: Run provider optional client certificate E2E
run: xvfb-run --auto-servernum pnpm test:e2e:provider-client-certificate
+ - name: Run LAN WebUI browser E2E
+ env:
+ PI_SCRATCH_DIR: ${{ runner.temp }}
+ run: xvfb-run --auto-servernum pnpm test:e2e:lan-webui
+
- name: Run image model settings Electron tests
run: |
xvfb-run --auto-servernum node --test apps/desktop/test/image-generation-row-empty-state.test.mjs
diff --git a/apps/desktop/test/lan-webui-browser-user-path.test.mjs b/apps/desktop/test/lan-webui-browser-user-path.e2e.mjs
similarity index 100%
rename from apps/desktop/test/lan-webui-browser-user-path.test.mjs
rename to apps/desktop/test/lan-webui-browser-user-path.e2e.mjs
diff --git a/docs/spec/01-product/03-lan-webui-mvp.md b/docs/spec/01-product/03-lan-webui-mvp.md
index 12e286334..4e2129e42 100644
--- a/docs/spec/01-product/03-lan-webui-mvp.md
+++ b/docs/spec/01-product/03-lan-webui-mvp.md
@@ -348,7 +348,7 @@ settings) and `apps/desktop/src/features/lan-webui/lan-catalog-sync.ts`
Automated coverage: `apps/desktop/test/lan-webui-organization.test.mjs`,
`lan-webui-restart.test.mjs` (saved startup and pairing lifecycle),
-`lan-webui-user-path.test.mjs` (real HTTP listener, fake Desktop),
-`lan-webui-browser-user-path.test.mjs` (Electron Chromium at phone size driving
-the shipped page), and `lan-webui-settings-user-path.test.mjs` (Desktop System
-settings in isolated Electron, with a fixture preload boundary).
+`lan-webui-user-path.test.mjs` (real HTTP listener, fake Desktop), and
+`lan-webui-settings-user-path.test.mjs` (isolated Desktop System settings).
+The phone-size Electron Chromium journey runs separately with
+`pnpm test:e2e:lan-webui` on the Electron-equipped CI runner.
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 2d7f7888c..81f499b11 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -166,6 +166,8 @@ The minimum selection is:
installed-layout artifact with an isolated profile.
- Session-list refresh or model capability lookup: `pnpm test:e2e` and
`pnpm test:e2e:boot`, including the synthetic large-list responsiveness check.
+- LAN WebUI pairing, navigation, chat, or model selection: `pnpm test:e2e:lan-webui`
+ on a runner with Electron and a display (Xvfb on Linux).
- Settings/composer/plugin search theme surfaces: `pnpm build:js` followed by
`pnpm test:e2e:theme-surfaces`.
- Composer clipboard representation and text insertion: `pnpm test:e2e:composer-paste`.
diff --git a/docs/spec/06-delivery/e2e/live-and-remote.md b/docs/spec/06-delivery/e2e/live-and-remote.md
index 6ea59462c..ac539695a 100644
--- a/docs/spec/06-delivery/e2e/live-and-remote.md
+++ b/docs/spec/06-delivery/e2e/live-and-remote.md
@@ -751,12 +751,13 @@ their separate platform acceptance.
These scenarios qualify the [LAN companion](../../01-product/03-lan-webui-mvp.md),
not the SSH remote Host, a standalone server, or a public Gateway. For all eight:
-**Milestone:** M6+ (WebUI MVP). **Status:** Partially automated — the core user
-path, pairing guards and organization merge run in
-`apps/desktop/test/lan-webui-*.test.mjs` (real listener, fake Desktop, Electron
-Chromium at phone size); real-device steps remain Draft. Use an isolated Desktop
-profile, disposable test devices and deterministic fixtures. Do not use a
-user's running instance.
+**Milestone:** M6+ (WebUI MVP). **Status:** Partially automated — pairing
+guards, HTTP commands and organization merge run in
+`apps/desktop/test/lan-webui-*.test.mjs` against a real listener and fake Desktop.
+`pnpm test:e2e:lan-webui` drives the shipped page in Electron Chromium at phone
+size, including on the Electron-equipped CI runner. Real-device steps remain
+Draft. Use an isolated Desktop profile, disposable devices and deterministic
+fixtures; do not use a user's running instance.
### E2E-269: Enable, pair and shut down
diff --git a/package.json b/package.json
index fafdd8bc9..e856e309a 100644
--- a/package.json
+++ b/package.json
@@ -120,6 +120,7 @@
"test:e2e:remote-file-manager": "node scripts/e2e-remote-file-manager.mjs",
"test:e2e:remote-mvp": "node scripts/e2e-remote-mvp.mjs",
"test:e2e:remote-mvp-ui": "node scripts/e2e-remote-mvp-ui.mjs",
+ "test:e2e:lan-webui": "node --test apps/desktop/test/lan-webui-browser-user-path.e2e.mjs",
"test:e2e:shortcut-settings": "node scripts/test-shortcut-settings.mjs",
"test:e2e:dialog-overflow": "node scripts/test-dialog-overflow.mjs",
"test:e2e:overlay-selection": "node scripts/test-overlay-selection.mjs",