diff --git a/packages/server/src/server/project-suggestions.test.ts b/packages/server/src/server/project-suggestions.test.ts index 0a2e07af56..d637ee2ea1 100644 --- a/packages/server/src/server/project-suggestions.test.ts +++ b/packages/server/src/server/project-suggestions.test.ts @@ -88,7 +88,8 @@ describe("listProjectSuggestions", () => { let gitService: WorkspaceGitServiceImpl; beforeEach(() => { - root = realpathSync(mkdtempSync(path.join(tmpdir(), "project-suggestions-"))); + // The native realpath expands Windows short names (RUNNER~1), which git reports in full. + root = realpathSync.native(mkdtempSync(path.join(tmpdir(), "project-suggestions-"))); gitService = new WorkspaceGitServiceImpl({ logger: createTestLogger(), paseoHome: path.join(root, ".paseo"), diff --git a/packages/server/src/server/project-suggestions.ts b/packages/server/src/server/project-suggestions.ts index 2bc30cb1d2..4ad73585de 100644 --- a/packages/server/src/server/project-suggestions.ts +++ b/packages/server/src/server/project-suggestions.ts @@ -118,7 +118,8 @@ async function resolveProjectRoot( return null; } const checkout = await workspaceGitService.getCheckout(cwd); - const rootPath = checkout.mainRepoRoot ?? checkout.worktreeRoot ?? cwd; + // Git reports Windows roots with forward slashes; resolve to the form project.add keys by. + const rootPath = resolve(checkout.mainRepoRoot ?? checkout.worktreeRoot ?? cwd); if (rootPath !== cwd && !(await isDirectory(rootPath))) { return null; }