mirror of
https://github.com/stablyai/orca.git
synced 2026-10-16 00:03:09 +00:00
Add task source provider availability reasons
Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
@@ -276,3 +276,4 @@ Done means: reviewers and future agents can understand the vision, implementatio
|
||||
- [x] 2026-06-13: Guarded backend automation ownership for runtime-host repos: newly saved/updated runtime-owned automations now record `remote_host_service`, and main-process dispatch resolution skips runtime targets before desktop renderer dispatch until durable remote scheduling exists. Verified with persistence and automation service regressions, targeted oxlint, and full `pnpm run typecheck`.
|
||||
- [x] 2026-06-13: Preserved exact GitLab provider identity for item-specific Tasks flows by threading `GitLabWorkItem.projectRef` into the task source context used for detail pages and Start Workspace handoff. Verified with TaskPage source-boundary regression, targeted oxlint, and full `pnpm run typecheck`.
|
||||
- [x] 2026-06-13: Removed the redundant locked SSH target row from the Add Project remote-path step after the host has already been selected, while preserving a compact reconnect action for disconnected locked hosts. Fresh Electron validation connected a Docker SSH target through Orca's relay IPC, added `/home/orca/host-context-e2e-local` via Add Project, and created a remote SSH worktree at `/home/orca/goldfish`; screenshots were added to the dark-background report. Verified with focused Add Project tests, targeted oxlint, and remote filesystem checks.
|
||||
- [x] 2026-06-13: Extended Tasks source availability reasons so missing provider auth, unavailable source tooling, and unsupported providers can surface as distinct source-host states instead of generic connection/version failures. The checklist row remains partial until runtime/provider preflight feeds these reasons end to end. Verified with focused source-summary tests and targeted oxlint.
|
||||
|
||||
@@ -278,4 +278,45 @@ describe('task source context summary', () => {
|
||||
})?.label
|
||||
).toBe('Some GitLab source hosts unavailable: 2 source hosts')
|
||||
})
|
||||
|
||||
it('shows provider-specific source availability reasons', () => {
|
||||
expect(
|
||||
getTaskSourceContextSummary({
|
||||
provider: 'github',
|
||||
providerLabel: 'GitHub',
|
||||
selectedRepoCount: 1,
|
||||
repoContexts: [
|
||||
{
|
||||
kind: 'task-source',
|
||||
provider: 'github',
|
||||
projectId: 'github:stablyai/orca',
|
||||
hostId: 'ssh:devbox',
|
||||
repoId: 'repo-1',
|
||||
providerIdentity: { provider: 'github', owner: 'stablyai', repo: 'orca' }
|
||||
}
|
||||
],
|
||||
hostAvailability: [{ hostId: 'ssh:devbox', reason: 'missing-provider-auth' }]
|
||||
})
|
||||
).toEqual({
|
||||
label: 'GitHub · devbox · provider auth needed · stablyai/orca',
|
||||
title:
|
||||
'GitHub · Host: devbox · Availability: devbox provider auth needed · Source: stablyai/orca'
|
||||
})
|
||||
|
||||
expect(
|
||||
getTaskSourceAvailabilityNotice({
|
||||
providerLabel: 'GitHub',
|
||||
sourceCount: 3,
|
||||
hostAvailability: [
|
||||
{ hostId: 'ssh:devbox', reason: 'unavailable-source-tool' },
|
||||
{ hostId: 'runtime:linux', reason: 'unsupported-provider' }
|
||||
]
|
||||
})
|
||||
).toEqual({
|
||||
label: 'Some GitHub source hosts unavailable: 2 source hosts',
|
||||
title:
|
||||
'Reconnect or update devbox source tool unavailable, linux provider unsupported on this host to load this source.',
|
||||
blocking: false
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -20,7 +20,12 @@ export type TaskSourceHostAvailability = {
|
||||
hostId: ExecutionHostScope
|
||||
status?: SshConnectionStatus
|
||||
health?: ExecutionHostHealth
|
||||
reason?: 'checking-task-source-capability' | 'missing-task-source-capability'
|
||||
reason?:
|
||||
| 'checking-task-source-capability'
|
||||
| 'missing-task-source-capability'
|
||||
| 'missing-provider-auth'
|
||||
| 'unavailable-source-tool'
|
||||
| 'unsupported-provider'
|
||||
}
|
||||
|
||||
export function getTaskSourceContextSummary(args: {
|
||||
@@ -211,6 +216,12 @@ function getAvailabilityStatusLabel(availability: TaskSourceHostAvailability): s
|
||||
return 'checking server capabilities'
|
||||
case 'missing-task-source-capability':
|
||||
return 'server update needed for task sources'
|
||||
case 'missing-provider-auth':
|
||||
return 'provider auth needed'
|
||||
case 'unavailable-source-tool':
|
||||
return 'source tool unavailable'
|
||||
case 'unsupported-provider':
|
||||
return 'provider unsupported on this host'
|
||||
}
|
||||
if (availability.status) {
|
||||
return availability.status === 'connected' ? null : getSshStatusLabel(availability.status)
|
||||
|
||||
Reference in New Issue
Block a user