From 0cdaf9803c79f1178d25c61ee7c846f3287db99b Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Mon, 26 Jan 2026 22:41:52 -0800 Subject: [PATCH] fix(test): also try findRepoRoot from cwd for A2UI path resolution --- src/canvas-host/a2ui.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/canvas-host/a2ui.ts b/src/canvas-host/a2ui.ts index 0b35832d2..575e77f83 100644 --- a/src/canvas-host/a2ui.ts +++ b/src/canvas-host/a2ui.ts @@ -51,8 +51,8 @@ async function resolveA2uiRoot(): Promise { if (process.execPath) { candidates.unshift(path.resolve(path.dirname(process.execPath), "a2ui")); } - // Find repo root by walking up from `here` (handles vitest/vite transforms). - const repoRoot = await findRepoRoot(here); + // Find repo root by walking up from `here` or cwd (handles vitest/vite transforms). + const repoRoot = (await findRepoRoot(here)) ?? (await findRepoRoot(process.cwd())); if (repoRoot) { candidates.push(path.resolve(repoRoot, "src/canvas-host/a2ui")); candidates.push(path.resolve(repoRoot, "dist/canvas-host/a2ui"));