agent-orchestrator/packages/web/src/__tests__
yyovil be061a3989
fix(core): adopt orphaned orchestrator worktrees (#1643)
* fix(core): adopt orphaned orchestrator worktrees (#1641)

* fix: address review feedback on worktree adoption

- Normalize CRLF line endings in parseWorktreeList for cross-platform support
- Collapse duplicate classifySpawnError payload blocks into single condition
- Filter prunable/deleted worktree entries in findManagedWorkspace
- Add GIT_TIMEOUT to git() helper for all execFileAsync calls
- Add tests for prunable entries and CRLF parsing

* fix: update test assertions for git() helper timeout

All git() calls now pass timeout: GIT_TIMEOUT to execFileAsync.
Update toHaveBeenCalledWith assertions to include the new option.
postCreate sh -c calls remain unchanged (direct execFileAsync).

* fix: mock existsSync in findManagedWorkspace tests

The existsSync(entry.path) filter added for prunable worktree detection
needs existsSync to return true for valid worktree paths in adoption tests.

* fix: use mockReturnValueOnce to prevent existsSync mock leaking

vi.clearAllMocks() does not reset mockReturnValue, only mock history.
Using mockReturnValueOnce ensures existsSync stubs don't leak to
subsequent tests and cause clearStaleWorktreePath to consume git mocks.

---------

Co-authored-by: AO Bot <ao-bot@composio.dev>
2026-05-05 20:34:00 +05:30
..
api-routes.test.ts fix(core): adopt orphaned orchestrator worktrees (#1643) 2026-05-05 20:34:00 +05:30
components.test.tsx Fix root dashboard project selection (#1480) 2026-04-24 18:35:38 +05:30
filesystem-browse-api.test.ts fix: always enable filesystem browsing (#1596) (#1599) 2026-05-01 12:51:43 +05:30
get-attention-level.test.ts Merge upstream/main into session/aa-22-lifecycle-fixes 2026-04-18 00:53:06 +05:30
helpers.ts feat(sessions): derive display names from task context (#1220) (#1224) 2026-04-22 12:24:03 +05:30
orchestrators.test.tsx Fix orchestrator identity to use one canonical session per project (#1487) 2026-04-25 18:57:31 +05:30
project-detail-route.test.ts refactor(core): storage redesign — projectId-based paths, JSON metadata (#1466) 2026-04-28 17:55:53 +05:30
projects-route.test.ts refactor(core): storage redesign — projectId-based paths, JSON metadata (#1466) 2026-04-28 17:55:53 +05:30
prompt-spawn.test.ts fix: model missing activity evidence explicitly (#122) 2026-04-17 19:28:56 +05:30
server-only-mock.ts fix: reduce dashboard JS bundle from 1.7MB to 170KB (#792) (#928) 2026-04-07 16:12:51 +05:30
services.test.ts Add multi-project storage, resolution, and project settings support (#1343) 2026-04-21 17:45:55 +05:30
setup.ts style(design): design review fixes + fresh Warm Terminal design system (#927) 2026-04-11 16:30:03 +05:30