Add default tab templates from orca.yaml

This commit is contained in:
Neil
2026-05-31 05:05:58 -07:00
parent 5d769d19b9
commit 372469b752
29 changed files with 676 additions and 119 deletions
+32 -4
View File
@@ -220,6 +220,10 @@ vi.mock('../hooks', () => ({
createSetupRunnerScript: vi.fn(),
getEffectiveHooks: vi.fn().mockReturnValue(null),
getEffectiveHooksFromConfig: vi.fn().mockReturnValue(null),
getDefaultTabCommandTrustContent: vi.fn(
(hooks: { scripts?: { setup?: string } } | null) => hooks?.scripts?.setup?.trim() ?? ''
),
getDefaultTabsLaunch: vi.fn().mockReturnValue(undefined),
getSetupRunnerEnvVars: (_repo: never, worktreePath: string) => ({
ORCA_ROOT_PATH: '/remote/repo',
ORCA_WORKTREE_PATH: worktreePath
@@ -8044,7 +8048,13 @@ describe('OrcaRuntimeService', () => {
}
}
})
expect(activateWorktree).toHaveBeenCalledWith('repo-1', expect.any(String), result.setup)
expect(activateWorktree).toHaveBeenCalledWith(
'repo-1',
expect.any(String),
result.setup,
undefined,
undefined
)
})
it('passes setup payloads through when explicitly activating CLI-created worktrees', async () => {
@@ -8096,7 +8106,13 @@ describe('OrcaRuntimeService', () => {
activate: true
})
expect(activateWorktree).toHaveBeenCalledWith('repo-1', expect.any(String), result.setup)
expect(activateWorktree).toHaveBeenCalledWith(
'repo-1',
expect.any(String),
result.setup,
undefined,
undefined
)
})
it('follows normal setup policy for CLI-created worktrees without activating them', async () => {
@@ -8731,7 +8747,13 @@ describe('OrcaRuntimeService', () => {
expect(detectRemoteAgentsMock).not.toHaveBeenCalled()
expect(spawn).not.toHaveBeenCalled()
expect(metaById[result.worktree.id]?.createdWithAgent).toBeUndefined()
expect(activateWorktree).toHaveBeenCalledWith('repo-1', result.worktree.id, undefined)
expect(activateWorktree).toHaveBeenCalledWith(
'repo-1',
result.worktree.id,
undefined,
undefined,
undefined
)
})
it('detects agents on the SSH host before launching remote startup drafts', async () => {
@@ -9679,7 +9701,13 @@ describe('OrcaRuntimeService', () => {
activate: true
})
expect(activateWorktree).toHaveBeenCalledWith('repo-1', expect.any(String), undefined)
expect(activateWorktree).toHaveBeenCalledWith(
'repo-1',
expect.any(String),
undefined,
undefined,
undefined
)
})
it('stamps createdAt alongside lastActivityAt so CLI-created worktrees get the Recent-sort grace window', async () => {