mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 08:37:49 +00:00
Add default tab templates from orca.yaml
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user