From 49c088e8805e57ff49b5793d42a375280e539366 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 01:00:32 +0000 Subject: [PATCH 1/2] Initial plan From c200526d92609951058fcc5db3fb853f0caf4cd0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Feb 2026 01:10:52 +0000 Subject: [PATCH 2/2] fix(e2e): replace __dirname with import.meta.url in ESM context __dirname is not available in ES module scope. Use fileURLToPath(import.meta.url) and dirname() as the ESM-compatible replacement. Fixes CI failure: ReferenceError: __dirname is not defined in ES module scope at mobile-visual-regression.spec.ts:25 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> --- e2e/mobile-visual-regression.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e/mobile-visual-regression.spec.ts b/e2e/mobile-visual-regression.spec.ts index 2ce55ca3d..0d647cdfb 100644 --- a/e2e/mobile-visual-regression.spec.ts +++ b/e2e/mobile-visual-regression.spec.ts @@ -1,7 +1,8 @@ import { test, expect } from '@playwright/test'; import { waitForReactMount, CONSOLE_BASE } from './helpers'; import { existsSync } from 'fs'; -import { join } from 'path'; +import { dirname, join } from 'path'; +import { fileURLToPath } from 'url'; /** * P3 Mobile Visual Regression tests. @@ -22,7 +23,7 @@ const MOBILE_VIEWPORTS = [ // Keep in sync with Console app route definitions (apps/console/src/routes). const ROUTES = ['/', '/dashboard']; -const snapshotsDir = join(__dirname, 'mobile-visual-regression.spec.ts-snapshots'); +const snapshotsDir = join(dirname(fileURLToPath(import.meta.url)), 'mobile-visual-regression.spec.ts-snapshots'); const hasBaselines = existsSync(snapshotsDir); test.describe('Mobile Visual Regression', () => {