drives: app rig — per-identity HOME/XDG roots, AppImage launch on a CDP port, second-instance deep-link hand-off (WKT-DEMO B, plan Task 2) #1838

Closed
opened 2026-09-24 18:26:22 +00:00 by ben · 2 comments
Owner

What

New app/tests/e2e/fixtures/appRig.ts (plan Task 2 Step 3, verbatim): instanceDirs, launchArgs (--appimage-extract-and-run --no-sandbox --remote-debugging-port=<port>), launchEnv (HOME / XDG_CONFIG_HOME / XDG_DATA_HOME per identity), spawnApp (under xvfb-run -a when no DISPLAY and not HEADED; tees the app log), attachCdp (playwright connectOverCDP, polls), secondInstanceArgv, deliverDeepLink (spawns the SAME AppImage with the SAME dirs and the matou://… link as argv — Electron's single-instance lock forwards it to the running primary; then polls location.hash until #/signin (or #/dashboard for an inbox link) and fails loud naming the last hash). Why argv: matou-app's generated .desktop carries no MimeType=x-scheme-handler/matou and there is no desktop paste UI (useSigninScan is unused), so argv is the app's only real receive path on Linux.

Acceptance

  • New appRig.test.ts (plan Task 2 Step 1, verbatim — incl. the fake-CDP deliverDeepLink race test) green; eslint clean.

depends_on: none.

Plan: docs/superpowers/plans/2026-09-24-wkt-app-drive.md (commit bc1d4ccc) — steps, exact code, tests and commands live there; this ticket is the work order. Spec: docs/superpowers/specs/2026-09-24-wkt-demo-founding-and-app-drives-design.md (Drive B). Read the plan header (Global Constraints, Review Focus) first. Drive A's plan/tickets: docs/superpowers/plans/2026-09-24-wkt-founding-drive.md, #1829–#1836.

Discipline: TDD as the plan orders it; one commit per task with the plan's subject line; STATUS entry in the same commit; nothing here changes any other target; the founder words are read from the kept bundle into memory only — never logged, never copied.

## What New `app/tests/e2e/fixtures/appRig.ts` (plan Task 2 Step 3, verbatim): `instanceDirs`, `launchArgs` (`--appimage-extract-and-run --no-sandbox --remote-debugging-port=<port>`), `launchEnv` (HOME / XDG_CONFIG_HOME / XDG_DATA_HOME per identity), `spawnApp` (under `xvfb-run -a` when no DISPLAY and not HEADED; tees the app log), `attachCdp` (playwright `connectOverCDP`, polls), `secondInstanceArgv`, `deliverDeepLink` (spawns the SAME AppImage with the SAME dirs and the `matou://…` link as argv — Electron's single-instance lock forwards it to the running primary; then polls `location.hash` until `#/signin` (or `#/dashboard` for an inbox link) and fails loud naming the last hash). Why argv: matou-app's generated `.desktop` carries no `MimeType=x-scheme-handler/matou` and there is no desktop paste UI (`useSigninScan` is unused), so argv is the app's only real receive path on Linux. ## Acceptance - New `appRig.test.ts` (plan Task 2 Step 1, verbatim — incl. the fake-CDP `deliverDeepLink` race test) green; eslint clean. depends_on: none. **Plan:** `docs/superpowers/plans/2026-09-24-wkt-app-drive.md` (commit `bc1d4ccc`) — steps, exact code, tests and commands live there; this ticket is the work order. **Spec:** `docs/superpowers/specs/2026-09-24-wkt-demo-founding-and-app-drives-design.md` (Drive B). Read the plan header (Global Constraints, Review Focus) first. Drive A's plan/tickets: `docs/superpowers/plans/2026-09-24-wkt-founding-drive.md`, #1829–#1836. **Discipline:** TDD as the plan orders it; one commit per task with the plan's subject line; STATUS entry in the same commit; nothing here changes any other target; the founder words are read from the kept bundle into memory only — never logged, never copied.

swarm-claim host=bens-mac-04 run=32049
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=32049 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1838 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1838,
  "status": "success",
  "commits": [
    "184639ecc289fa3e733abd8d23633f632419f6bf"
  ],
  "changed_files": [
    "app/tests/e2e/fixtures/appRig.ts",
    "app/tests/e2e/fixtures/appRig.test.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "CI=true pnpm exec vitest run tests/e2e/fixtures/appRig.test.ts",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm exec eslint tests/e2e/fixtures/appRig.ts tests/e2e/fixtures/appRig.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "New appRig.test.ts (plan Task 2 Step 1, verbatim — incl. the fake-CDP deliverDeepLink race test) green": "app/tests/e2e/fixtures/appRig.test.ts — 4 tests green under vitest (commit 184639ec); the 4th test resolves when the fake CDP page reaches #/signin and rejects naming the stuck #/dashboard",
    "eslint clean": "CI=true pnpm exec eslint tests/e2e/fixtures/appRig.ts tests/e2e/fixtures/appRig.test.ts exit 0"
  },
  "summary": "Added app/tests/e2e/fixtures/appRig.ts (instance dirs, launch args, launchEnv, spawnApp, attachCdp, secondInstanceArgv, deliverDeepLink) and its verbatim tests; both green and eslint clean.",
  "blockers": []
}
**close-report** for #1838 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1838, "status": "success", "commits": [ "184639ecc289fa3e733abd8d23633f632419f6bf" ], "changed_files": [ "app/tests/e2e/fixtures/appRig.ts", "app/tests/e2e/fixtures/appRig.test.ts", "STATUS.md" ], "tests": [ { "command": "CI=true pnpm exec vitest run tests/e2e/fixtures/appRig.test.ts", "exit_code": 0 }, { "command": "CI=true pnpm exec eslint tests/e2e/fixtures/appRig.ts tests/e2e/fixtures/appRig.test.ts", "exit_code": 0 } ], "criteria": { "New appRig.test.ts (plan Task 2 Step 1, verbatim — incl. the fake-CDP deliverDeepLink race test) green": "app/tests/e2e/fixtures/appRig.test.ts — 4 tests green under vitest (commit 184639ec); the 4th test resolves when the fake CDP page reaches #/signin and rejects naming the stuck #/dashboard", "eslint clean": "CI=true pnpm exec eslint tests/e2e/fixtures/appRig.ts tests/e2e/fixtures/appRig.test.ts exit 0" }, "summary": "Added app/tests/e2e/fixtures/appRig.ts (instance dirs, launch args, launchEnv, spawnApp, attachCdp, secondInstanceArgv, deliverDeepLink) and its verbatim tests; both green and eslint clean.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1838
No description provided.