Summary
The Playwright E2E workflow (.github/workflows/e2e-playwright.yml) has been red on main since its introduction in commit 853b1d6 (2026-05-02). PR #112 fixed the outermost layer (the workflow had a typo SHA for denoland/setup-deno@v2 and the @playwright/test package was never declared anywhere) — but that unblocked the actual vite dev-server boot, which then exposed two deeper, pre-existing bugs:
-
Broken @src/ alias in vite.config.js — the root vite config declares:
optimizeDeps: {
include: ['@src/app/tea/AffineTEA.js', '@src/app/tea/AffineTEARouter.js'],
},
But the only configured aliases are affinescript: '/src/app/tea' and @tea: '/src/app/tea'. There is no @src alias. Vite reports:
[WebServer] Failed to resolve dependency: @src/app/tea/AffineTEA.js, present in client 'optimizeDeps.include'
[WebServer] Failed to resolve dependency: @src/app/tea/AffineTEARouter.js, present in client 'optimizeDeps.include'
The files exist at src/app/tea/AffineTEA.js and src/app/tea/AffineTEARouter.js — the @src/ prefix in optimizeDeps.include is the only thing that needs to change (drop the @, or remove the entry entirely since vite auto-discovers).
-
idaptik-ums/index.html references src/App.res.mjs which is never built in CI — idaptik-ums/src/App.res exists, but the workflow's deno task res:build only compiles the root rescript.json, not idaptik-ums/rescript.json. So idaptik-ums/src/App.res.mjs never materialises:
[WebServer] src/App.res.mjs (imported by /home/runner/work/idaptik/idaptik/idaptik-ums/index.html)
[WebServer] Error: Timed out waiting 60000ms from config.webServer.
Either the workflow needs an additional cd idaptik-ums && rescript build step, or the playwright config should not be serving idaptik-ums/index.html at all (the tests page.goto('/') from the root, so vite should only need root index.html).
Fundamental fix recipe
Layer 1 — vite alias: Edit vite.config.js:
optimizeDeps: {
- include: ['@src/app/tea/AffineTEA.js', '@src/app/tea/AffineTEARouter.js'],
+ include: ['/src/app/tea/AffineTEA.js', '/src/app/tea/AffineTEARouter.js'],
},
Or simply drop the entry — vite will pre-bundle on demand.
Layer 2 — sub-project build: Add to .github/workflows/e2e-playwright.yml after the existing Build ReScript step:
- name: Build ReScript (idaptik-ums)
run: cd idaptik-ums && npx rescript build || echo "ums ReScript build attempted"
(Mirror the soft-fail pattern of the existing step.)
Layer 3 (verification): Re-run locally with just test-compat (Justfile line 303) on a clean checkout to confirm the vite dev-server boots without unresolved-import warnings, then merge.
Why this isn't folded into PR #112
PR #112 ("non-megaport baseline sweep") deliberately scopes to infrastructure outside the megaport. The deeper layers above are real bugs but they live in the active surface of the migration (the very vite config that wires AffineScript TEA shims into the ReScript app). Fixing them properly requires touching the ReScript→AffineScript compilation pipeline coordination — overlapping with the megaport itself. Keeping them as a tracked follow-up preserves the clean "baseline outside megaport is green; megaport itself is in flight" separation that PR #112's commit message describes as the success criterion.
Acceptance criteria
Cross-references
🤖 Generated with Claude Code
Summary
The Playwright E2E workflow (
.github/workflows/e2e-playwright.yml) has been red onmainsince its introduction in commit 853b1d6 (2026-05-02). PR #112 fixed the outermost layer (the workflow had a typo SHA fordenoland/setup-deno@v2and the@playwright/testpackage was never declared anywhere) — but that unblocked the actual vite dev-server boot, which then exposed two deeper, pre-existing bugs:Broken
@src/alias invite.config.js— the root vite config declares:But the only configured aliases are
affinescript: '/src/app/tea'and@tea: '/src/app/tea'. There is no@srcalias. Vite reports:The files exist at
src/app/tea/AffineTEA.jsandsrc/app/tea/AffineTEARouter.js— the@src/prefix inoptimizeDeps.includeis the only thing that needs to change (drop the@, or remove the entry entirely since vite auto-discovers).idaptik-ums/index.htmlreferencessrc/App.res.mjswhich is never built in CI —idaptik-ums/src/App.resexists, but the workflow'sdeno task res:buildonly compiles the rootrescript.json, notidaptik-ums/rescript.json. Soidaptik-ums/src/App.res.mjsnever materialises:Either the workflow needs an additional
cd idaptik-ums && rescript buildstep, or the playwright config should not be servingidaptik-ums/index.htmlat all (the testspage.goto('/')from the root, so vite should only need rootindex.html).Fundamental fix recipe
Layer 1 — vite alias: Edit
vite.config.js:optimizeDeps: { - include: ['@src/app/tea/AffineTEA.js', '@src/app/tea/AffineTEARouter.js'], + include: ['/src/app/tea/AffineTEA.js', '/src/app/tea/AffineTEARouter.js'], },Or simply drop the entry — vite will pre-bundle on demand.
Layer 2 — sub-project build: Add to
.github/workflows/e2e-playwright.ymlafter the existingBuild ReScriptstep:(Mirror the soft-fail pattern of the existing step.)
Layer 3 (verification): Re-run locally with
just test-compat(Justfile line 303) on a clean checkout to confirm the vite dev-server boots without unresolved-import warnings, then merge.Why this isn't folded into PR #112
PR #112 ("non-megaport baseline sweep") deliberately scopes to infrastructure outside the megaport. The deeper layers above are real bugs but they live in the active surface of the migration (the very vite config that wires AffineScript TEA shims into the ReScript app). Fixing them properly requires touching the ReScript→AffineScript compilation pipeline coordination — overlapping with the megaport itself. Keeping them as a tracked follow-up preserves the clean "baseline outside megaport is green; megaport itself is in flight" separation that PR #112's commit message describes as the success criterion.
Acceptance criteria
deno task dev:vitetools/compat-testing/tests/{game-loads,accessibility,performance}.spec.jsall pass on the chosen browserCross-references
@playwright/testdep)tools/compat-testing/playwright.config.js— webServer configidaptik-ums/rescript.json— sub-project ReScript build config (currently unused by CI)🤖 Generated with Claude Code