Remove redundant SSH target row in add project

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo-H
2026-06-13 00:58:22 -07:00
co-authored by Orca
parent 7f46ca2151
commit b8afa5e861
4 changed files with 58 additions and 12 deletions
@@ -211,7 +211,7 @@ describe('AddRepoDialogStepContent nested imports', () => {
expect(html).toContain('Open project on SSH host')
expect(html).toContain('openclaw 2')
expect(html).toContain('Host path')
expect(html).toContain('SSH target')
expect(html).not.toContain('SSH target')
expect(html).not.toContain('github.com')
expect(html).not.toContain('Connect')
})
@@ -239,7 +239,9 @@ describe('AddRepoDialogStepContent nested imports', () => {
})
expect(html).toContain('openclaw 2')
expect(html).toContain('is disconnected')
expect(html).toContain('Connect')
expect(html).not.toContain('SSH target')
expect(html).toContain('placeholder="/home/user/project"')
expect(html).toContain('disabled=""')
})
@@ -143,17 +143,23 @@ export function RemoteStep({
</div>
)}
</div>
) : selectedTarget ? (
<div className="space-y-1">
<label className="text-[11px] font-medium text-muted-foreground">
{translate('auto.components.sidebar.AddRepoRemoteStep.44637f43bd', 'SSH target')}
</label>
<SshTargetRow
target={selectedTarget}
isSelected
onSelect={() => undefined}
onConnect={onConnectTarget}
/>
) : selectedTarget && !selectedTargetConnected ? (
<div className="flex items-center justify-between gap-3 rounded-md border border-border bg-muted/30 px-3 py-2">
<p className="min-w-0 text-xs text-muted-foreground">
{translate(
'auto.components.sidebar.AddRepoRemoteStep.lockedDisconnected',
'{{value0}} is disconnected.',
{ value0: selectedTargetLabel ?? 'This SSH host' }
)}
</p>
<Button
variant="outline"
size="xs"
className="shrink-0"
onClick={() => onConnectTarget(selectedTarget.id)}
>
{translate('auto.components.sidebar.AddRepoRemoteStep.93e0221434', 'Connect')}
</Button>
</div>
) : null}