Skip to content

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

fix(plugins): retain both E2E scenarios after GenUI integration

Seraph-x1da0b1a20754
diff --cc docs/spec/06-delivery/04-e2e-test-plan.md
index b69f39ed7,e5ba6c70b..a2dd82ce5
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@@ -18656,28 -18656,46 +18656,71 @@@ host-created files. The full app's file
and `plugin-composer-suggestion.test.mjs`; the rendered journey remains a
manual/Electron check when this surface changes.
-
+### E2E-REMOTE-FILE-MANAGER: Scoped remote plugin reads
+
+Run `node scripts/e2e-remote-file-manager.mjs` to validate the shipped copy in
+`apps/desktop/resources/plugins/pi.file-manager`. This is the release acceptance
+path: passing against a separate development plugin does not prove the bundled
+user path is repaired. The runner records the loaded directory in its output.
+An optional `<built-file-manager-directory>` argument selects the companion
+plugin's rebuilt `views/` or unpacked official PluginPack artifact for development
+validation only. Before accepting #1711, update the bundled release, its upstream
+tag/commit and per-file checksums, then rerun the default path on the updated PR
+integration candidate.
+`PI_FILE_MANAGER_QA_DIR` may point to an existing plugin `tests/electron`
+installation providing Playwright; `PI_ELECTRON_BINARY` selects an existing
+compatible Electron runtime. `PI_E2E_ARTIFACTS` optionally preserves screenshots.
+
+The isolated production plugin process and `file://` view use Desktop's actual
+SDK broker, durable-binding reader, loopback RACP transport and Host filesystem
+service. Only the fixture's project-record lookup and authentication bootstrap
+are supplied by the harness. Verify nested listings, text/image bytes, hidden
+credentials, read-only editor/save/menu controls, visible disconnect errors and
+refresh recovery, rejected late previews and ancestor opens after a project
+switch, and restored local editing/Browser/editor detection. No model, user
+profile or external SSH server participates. Real SSH transport and native
+Windows/Linux behavior require their separate platform acceptance.
++
+ ### E2E-GENUI-inline-visualization-card: a visualization renders inline and stays sandboxed
+
+ - **Preconditions**: The app is running with a local Agent session and the
+ builtin `pi-desktop/visualize` skill enabled. A second session uses a remote
+ workspace.
+ - **Steps**: 1) Ask for an interactive chart (for example "show a slider that
+ changes a sine wave's frequency"). 2) Wait for the turn to finish, then drag
+ the slider. 3) Switch the app theme between light and dark. 4) Press the
+ card's expand button, then Esc. 5) Ask the model to write a non-`.html` file
+ into the visualization directory, and to write a fragment that calls
+ `fetch("https://example.com")`. 6) Fork the session, then delete the source
+ session. 7) Repeat step 1 in the remote session. 8) Relocate the data directory,
+ then fork a transcript that still names its old visualization path. 9) Try
+ redirected visualization roots and a `.html` FIFO, and open two document
+ URLs from callers that omit the iframe sandbox. 10) Expand a card while
+ eight inline cards are live.
+ - **Expected**:
+ - No permission card appears for the fragment write. While streaming, the
+ reply shows plain text; after completion the `::visualize` line is
+ replaced by a card whose height fits the content (at most 2000 px).
+ - The slider works; theme changes recolor the card without a reload.
+ - Expand opens a large modal copy; Esc closes it and the inline card keeps
+ its state.
+ - The non-`.html` write fails with a tool error; fetch requests are blocked,
+ and the frame cannot open popups or navigate remotely. The ADR's WebRTC
+ ICE limitation remains explicit rather than a blanket no-network claim.
+ - The fork retains its own card after the source session is deleted, including
+ a fork made after data relocation. The source's directory is removed.
+ - Redirected roots cannot bypass Ask write confirmation or let cleanup delete
+ unrelated data. FIFO requests fail without blocking other filesystem work.
+ - Every document response enforces an opaque sandbox; a caller that omits
+ iframe sandbox cannot read another session's DOM.
+ - Expanded and inline frames share the eight-frame quota, and the expanded
+ card's original inline control state remains unchanged.
+ - The remote session gets no visualization directory or skill.
+ - **Coverage**: `pnpm test:e2e:gen-ui` runs the offline Electron card journey,
+ including real protocol responses, bundled assets, focus/guest Escape,
+ viewport release, and unsandboxed callers through a real isolated Host.
+ Native directory, FIFO, and ABA regressions run in `visualizations/files`;
+ `gen-ui-file-safety.test.mjs` validates the private Host-to-Main boundary.
+ Rust visualization RPC/lifecycle/fork tests
+ cover authorization, deletion safety, Windows path spelling, and relocation.
+ - **Status**: Automated without a paid provider or a user's running instance.