Skip to content

T-AAR2-zoo-real-backend-e2e

State: planning/proposed · Impact: medium · Complexity: large

Move zoo’s Playwright suite off its browser mock and onto the real backend over HTTP in a scratch root, following the pumice pattern.

LocationRole today
apps/zoo/src-tauri/src/commands/Tauri IPC commands; no HTTP transport and no axum dependency
apps/zoo/src-tauri/src/bin/zoo-cli.rsA CLI bin, not a server
apps/zoo/src-nuxt/app/plugins/browser-mock.client.ts, app/utils/browser-mock.tsDev-only IPC stand-in
apps/zoo/src-nuxt/tests/e2e/4 Playwright specs (delete-instance, netpolicy, mappings, …) against bun run dev on 18110 and the mock
apps/zoo/moon.ymle2e task, local only
dirs::home_dir()Called in spec/engine.rs, bin/zoo-cli.rs, commands/mappings.rs to expand ~ and pick a default browse root. These are content-plane paths, not state
dev-ports.yamlzoo 18110

Zoo’s handlers sit behind a transport-agnostic API with an HTTP router, a zoo-server bin on the shared headless helper from T-UU4J builds state from fleet dirs, the web build picks HTTP outside Tauri, and the e2e suite runs through scratchTauriApp. The dirs::home_dir() calls go through one helper with an #[expect(clippy::disallowed_methods, reason = "…")], since they resolve user content, not state.

  1. Make the command handlers transport-agnostic; generate or hand-write an Axum router over them.
  2. Add zoo-server on the shared helper, using fleet dirs and a dev-ports.yaml port.
  3. Web transport selection in the Nuxt app.
  4. Port the Playwright suite; for VM-launching flows, decide per spec whether the backend runs the real VM path in CI or the spec stays desktop-only, and record the choice in the PR.
  5. Route the home_dir calls through one annotated helper.
  6. Delete the mock if nothing else uses it.
AreaNote
apps/zoo/src-tauri/API split, router, zoo-server
apps/zoo/src-nuxt/Transport, suite, mock removal
  • AC-1: moon run zoo:e2e passes against zoo-server in a scratch root, with the isolation assertion on.
  • AC-2: No e2e spec relies on browser-mock.
  • AC-3: Clippy reports no unannotated dirs:: call in zoo.
  • Desktop smoke.
  • Other apps (T-KOTJ, T-JPFC, T-TLET).
  • T-UU4J for the headless helper and scratchTauriApp.
  • The plan listed zoo’s dirs:: calls as state paths to move onto fleet. They expand user paths, so they get an annotated opt-out instead.

T-UU4J


← Back to Tasks