mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
fix(projects): refuse project setup on a paired server's SSH host with a clear reason (#33284)
* Refuse unsupported SSH project setup before local API dispatch * fix(projects): keep the desktop's SSH refusal copy and drop a re-export The desktop's own project-setup IPC is not an Orca server, so it keeps saying the SSH connection is not connected; the renderer now refuses SSH setup before reaching it. Callers import the shared refusal message directly instead of through the controller. Adds a headless paired e2e that sets up a project on the server's SSH host from a web client. Refs #33124 * fix(projects): give the server refusal only for a paired server's SSH host A desktop's own SSH host keeps its 'not connected' copy; the server refusal shows on a web client, or for a target only a paired server lists. Refs #33124 * test(e2e): read the added SSH target from the RPC result * test(e2e): pass a typed SSH execution host id * test(e2e): give the paired SSH project-setup timeout bump its reason --------- Co-authored-by: Mohith S <smohith58@gmail.com>
This commit is contained in:
@@ -22,10 +22,7 @@ import {
|
||||
import { getProjectHostSetupForRepo } from '../../shared/project-host-setup-lookup'
|
||||
import { resolveImportedFolderProjectLink } from '../../shared/imported-folder-project-identity'
|
||||
import { invalidateAuthorizedRootsCache } from '../ipc/registered-worktree-roots-cache'
|
||||
import {
|
||||
SshHostNotServedError,
|
||||
sshTargetNotConnectedMessage
|
||||
} from '../providers/ssh-host-not-served-error'
|
||||
import { SshHostNotServedError } from '../providers/ssh-host-not-served-error'
|
||||
import { runWorktreeChangeInvalidators } from '../ipc/worktree-change-invalidators'
|
||||
import { prepareLocalWorktreeRootForRepo } from '../worktree-root-preparation'
|
||||
import { updateProjectHostSetupWithProvenKind } from '../folder-repo-git-conversion'
|
||||
@@ -44,6 +41,7 @@ import {
|
||||
import { runtimeVisibleProjectHostSetups } from './runtime-visible-catalog'
|
||||
import {
|
||||
findProjectHostSetup,
|
||||
SERVER_SSH_PROJECT_ADD_UNAVAILABLE_MESSAGE,
|
||||
type ProjectHostSetupTarget
|
||||
} from '../../shared/project-host-setup-target'
|
||||
|
||||
@@ -68,11 +66,8 @@ function assertCloneHostIsSupported(hostId: ExecutionHostId | null | undefined):
|
||||
)
|
||||
}
|
||||
|
||||
export const SERVER_SSH_PROJECT_ADD_UNAVAILABLE_MESSAGE =
|
||||
"This Orca server can't add projects on its SSH hosts. Add the SSH host on your computer to open its projects."
|
||||
|
||||
function sshTargetNotServedError(connectionId: string): SshHostNotServedError {
|
||||
return new SshHostNotServedError(connectionId, sshTargetNotConnectedMessage(connectionId))
|
||||
return new SshHostNotServedError(connectionId, SERVER_SSH_PROJECT_ADD_UNAVAILABLE_MESSAGE)
|
||||
}
|
||||
|
||||
export class RuntimeProjectHostSetupController {
|
||||
|
||||
Reference in New Issue
Block a user