4 4 #
Mise Task Architecture Phase 2 Implementation Plan 6 6 > **For agentic workers:** REQUIRED SUB-SKILL: Use /skill:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
8 8 **Goal:** Move existing diff-review and UI browser suites into extension-local mise tasks, run both in Chromium and Firefox, and replace extension-specific root commands with one aggregate `e2e` task.
10 -**Architecture:** Each browser-owning extension controls its Playwright configuration and local `e2e` command. Root mise installs both browser engines once, then dispatches extension-local suites sequentially through monorepo task syntax.
10 +**Architecture:** A root Playwright base owns the shared Chromium/Firefox headless policy, while each browser-owning extension overlays suite-specific paths and timeouts and controls its local `e2e` command. Root mise installs both browser engines once, then dispatches extension-local suites sequentially through monorepo task syntax.
12 12 **Tech Stack:** mise monorepo tasks, Playwright 1.61, Chromium, Firefox, npm workspaces, TypeScript.
21 +- `playwright.base.ts`: shared Chromium, Firefox, and headless policy.
21 22 - `extensions/diff-review/mise.toml`: diff-review E2E ownership.
22 23 - `extensions/ui/mise.toml`: UI E2E ownership.
26 -- `extensions/diff-review/playwright.config.ts`: Chromium and Firefox projects.
27 -- `extensions/ui/playwright.config.ts`: Chromium and Firefox projects without a Windows-only executable override.
27 +- `extensions/diff-review/playwright.config.ts`: diff-review overlay on the shared browser base.
28 +- `extensions/ui/playwright.config.ts`: UI overlay on the shared browser base without a Windows-only executable override.
28 29 - `extensions/diff-review/package.json`: remove duplicate `test:e2e` script ownership.
29 30 - `extensions/ui/package.json`: remove duplicate `test:e2e` script ownership.
30 31 - `mise.toml`: replace public browser-install and diff-review-specific tasks with aggregate `e2e`.
47 +- Create: `playwright.base.ts`
46 48 - Modify: `extensions/diff-review/playwright.config.ts`
47 49 - Modify: `extensions/ui/playwright.config.ts`
70 72 Expected: diff-review lists Firefox tests only, and UI lists Chromium tests only.
71 73 This is the failing baseline for the required two-browser matrix.
73 -- [ ] **Step 3: Configure diff-review for both browsers**
75 +- [ ] **Step 3: Create the shared browser base**
75 -Replace `extensions/diff-review/playwright.config.ts` with:
77 +Create `playwright.base.ts`:
78 80 import { defineConfig }
from "@playwright/test";
80 82 export default defineConfig({
82 - testMatch:
"*.spec.ts",
86 84 { name:
"chromium", use: { browserName:
"chromium" } },
87 85 { name:
"firefox", use: { browserName:
"firefox" } },
93 +The root base owns only policy common to every extension suite.
95 +- [ ] **Step 4: Configure diff-review as a local overlay**
97 +Replace `extensions/diff-review/playwright.config.ts` with:
100 +import { defineConfig } from "@playwright/test";
101 +import base from "../../playwright.base.ts";
103 +export default defineConfig(base, {
104 + testDir: "__e2e__",
105 + testMatch: "*.spec.ts",
95 111 Keep existing timeout and retry policy unchanged.
97 -- [ ] **Step 4: Configure UI for both Playwright-managed browsers**
113 +- [ ] **Step 5: Configure UI as a local overlay**
99 115 Replace `extensions/ui/playwright.config.ts` with:
102 118 import { defineConfig }
from "@playwright/test";
104 -export default defineConfig({
120 +import base
from "../../playwright.base.ts";
122 +export default defineConfig(base, {
105 123 testDir:
"./__e2e__",
107 125 expect: { timeout:
5_000 },
109 - { name: "chromium", use: { browserName: "chromium" } },
110 - { name: "firefox", use: { browserName: "firefox" } },
114 127 viewport: { width:
900, height:
700 },
119 132 Delete the `node:fs` import and hard-coded Windows Chrome path.
120 133 Playwright’s installed Chromium must be used consistently on every platform.
122 -- [ ] **Step 5: Verify both projects are discovered**
135 +- [ ] **Step 6: Verify both projects are discovered**
134 147 - Both UI specs appear once under `[chromium]` and once under `[firefox]`.
135 148 - `real-rpc-smoke.spec.ts` remains listed but runtime-skipped unless explicitly enabled.
137 -- [ ] **Step 6: Install the two browser engines for verification**
150 +- [ ] **Step 7: Install the two browser engines for verification**
146 159 Existing cached engines may be reused.
147 160 Do not use `--with-deps`; system-package mutation belongs to CI environment setup, not this cross-platform task.
149 -- [ ] **Step 7: Run both suites directly**
162 +- [ ] **Step 8: Run both suites directly**
162 175 - UI’s real-RPC smoke is skipped by default in both projects.
163 176 - No OS-specific browser executable is required.
165 -- [ ] **Step 8: Commit browser matrix normalization**
178 +- [ ] **Step 9: Commit browser matrix normalization**
170 -git add extensions/diff-review/playwright.config.ts extensions/ui/playwright.config.ts
183 +git add playwright.base.ts extensions/diff-review/playwright.config.ts extensions/ui/playwright.config.ts
171 184 git diff --cached --check
172 185 git commit -m
"test(e2e): cover chromium and firefox" 175 -Expected: only the two Playwright configs are committed.
188 +Expected: the shared base and two extension overlays are committed.
177 190 ###
Task 2: Move E2E Command Ownership Into Extensions