mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 10:58:10 +00:00
Simplify remote host status popover
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
1 src/renderer/src/components/settings/quick-commands/QuickCommandsToolbar.tsx
|
||||
1 src/renderer/src/components/settings/repository/hosts/RepositoryHostSetupsSection.tsx
|
||||
1 src/renderer/src/components/sidebar/host-admission/ssh/AddRemoteHostSshConfigPicker.tsx
|
||||
4 src/renderer/src/components/status-bar/SshStatusSegment.tsx
|
||||
1 src/renderer/src/components/status-bar/resource-usage-popover-body.tsx
|
||||
1 src/renderer/src/components/tab-bar/TabBarQuickCommandAddActions.tsx
|
||||
2 src/renderer/src/components/terminal-pane/quick-commands/TerminalQuickCommandsSubmenu.tsx
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
import { useRef, useState } from 'react'
|
||||
import { Loader2 } from 'lucide-react'
|
||||
import { useTranslate, useIntlLocale } from '@/i18n/use-translate'
|
||||
import { formatUiNarrowRelativeTime } from '@/i18n/relative-time-format'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useMountedRef } from '@/hooks/useMountedRef'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import {
|
||||
DropdownMenuItem,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubContent,
|
||||
DropdownMenuSubTrigger
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import type { HostRecoveryObservation } from './use-remote-host-menu-state'
|
||||
|
||||
export function RemoteHostStatusRow({
|
||||
label,
|
||||
kind,
|
||||
tone,
|
||||
status,
|
||||
actionLabel,
|
||||
actionKind,
|
||||
onAction,
|
||||
disabled,
|
||||
errorSentence,
|
||||
rawDetail,
|
||||
recovery,
|
||||
now,
|
||||
onRetry,
|
||||
onDisconnect
|
||||
}: {
|
||||
label: string
|
||||
kind?: string
|
||||
tone: 'connected' | 'offline' | 'busy' | 'error'
|
||||
status: string
|
||||
actionLabel: string
|
||||
actionKind: 'connect' | 'disconnect' | 'recover'
|
||||
onAction?: () => Promise<void> | void
|
||||
disabled?: boolean
|
||||
errorSentence?: string
|
||||
rawDetail?: string
|
||||
recovery?: HostRecoveryObservation
|
||||
now: number
|
||||
onRetry?: () => Promise<void>
|
||||
onDisconnect?: () => Promise<void>
|
||||
}): React.JSX.Element {
|
||||
const t = useTranslate()
|
||||
const locale = useIntlLocale()
|
||||
const mounted = useMountedRef()
|
||||
const pending = useRef<{ token: symbol; kind: typeof actionKind } | null>(null)
|
||||
const [busy, setBusy] = useState<typeof actionKind | null>(null)
|
||||
const [open, setOpen] = useState(false)
|
||||
const reconnectCard =
|
||||
tone === 'busy' && recovery && (recovery.attempt >= 3 || now - recovery.since >= 30_000)
|
||||
const hasCard = Boolean(errorSentence || reconnectCard)
|
||||
const run = async (action: (() => Promise<void> | void) | undefined, kind: typeof actionKind) => {
|
||||
if (!action || pending.current?.kind === kind) {
|
||||
return
|
||||
}
|
||||
const token = Symbol()
|
||||
pending.current = { token, kind }
|
||||
setBusy(kind)
|
||||
try {
|
||||
await action()
|
||||
} finally {
|
||||
if (pending.current?.token === token) {
|
||||
pending.current = null
|
||||
if (mounted.current) {
|
||||
setBusy(null)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let relativeTime = ''
|
||||
if (reconnectCard) {
|
||||
const elapsed = Math.max(1000, now - recovery.since)
|
||||
const [unit, divisor] =
|
||||
elapsed < 60_000
|
||||
? (['second', 1000] as const)
|
||||
: elapsed < 3_600_000
|
||||
? (['minute', 60_000] as const)
|
||||
: elapsed < 86_400_000
|
||||
? (['hour', 3_600_000] as const)
|
||||
: (['day', 86_400_000] as const)
|
||||
relativeTime = formatUiNarrowRelativeTime(-Math.floor(elapsed / divisor), unit, locale)
|
||||
}
|
||||
const rowName = `${label}${kind ? ` ${kind}` : ''}, ${status}`
|
||||
const details = (
|
||||
<>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<span className="flex size-3 shrink-0 items-center justify-center" aria-hidden="true">
|
||||
{tone === 'busy' ? (
|
||||
<Loader2 className="size-3 animate-spin text-muted-foreground motion-reduce:animate-none" />
|
||||
) : (
|
||||
<span
|
||||
className={cn(
|
||||
'size-1.5 rounded-full',
|
||||
tone === 'connected'
|
||||
? 'bg-status-success'
|
||||
: tone === 'error'
|
||||
? 'bg-destructive'
|
||||
: 'border border-muted-foreground'
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side="top" sideOffset={4}>
|
||||
{status}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
<span className="min-w-0 truncate text-xs font-medium">{label}</span>
|
||||
{kind ? <span className="shrink-0 text-xs text-muted-foreground">{kind}</span> : null}
|
||||
</>
|
||||
)
|
||||
const action = (
|
||||
<DropdownMenuItem
|
||||
asChild
|
||||
disabled={disabled || busy === actionKind || !onAction}
|
||||
onSelect={(event) => {
|
||||
event.preventDefault()
|
||||
setOpen(false)
|
||||
void run(onAction, actionKind)
|
||||
}}
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
aria-label={`${actionLabel} ${label}`}
|
||||
className={cn(
|
||||
'shrink-0 px-1.5 py-0.5 text-2xs text-muted-foreground',
|
||||
tone !== 'error' &&
|
||||
'can-hover:opacity-0 can-hover:group-hover:opacity-100 can-hover:group-focus-within:opacity-100 can-hover:data-[highlighted]:opacity-100'
|
||||
)}
|
||||
>
|
||||
{actionLabel}
|
||||
</button>
|
||||
</DropdownMenuItem>
|
||||
)
|
||||
const triggerClass = 'min-w-0 flex-1'
|
||||
return (
|
||||
<div className="group flex items-center rounded-md hover:bg-accent focus-within:bg-accent">
|
||||
{hasCard ? (
|
||||
<DropdownMenuSub open={open} onOpenChange={setOpen}>
|
||||
<DropdownMenuSubTrigger className={triggerClass} hideChevron aria-label={rowName}>
|
||||
{details}
|
||||
</DropdownMenuSubTrigger>
|
||||
<DropdownMenuSubContent className="w-[min(18rem,calc(100vw-1rem))] p-1.5">
|
||||
<p className="px-1.5 py-1 text-xs text-muted-foreground">
|
||||
{errorSentence ??
|
||||
t(
|
||||
'auto.components.status.bar.RemoteHostStatusRow.unreachable_since',
|
||||
"Can't reach this host since {{time}}.",
|
||||
{ time: relativeTime }
|
||||
)}
|
||||
</p>
|
||||
{errorSentence ? (
|
||||
<DropdownMenuItem
|
||||
disabled={!rawDetail}
|
||||
onSelect={(event) => {
|
||||
event.preventDefault()
|
||||
if (rawDetail) {
|
||||
void window.api.ui.writeClipboardText(rawDetail)
|
||||
}
|
||||
}}
|
||||
>
|
||||
{t('auto.components.status.bar.RemoteHostStatusRow.copy_error', 'Copy error')}
|
||||
</DropdownMenuItem>
|
||||
) : (
|
||||
<DropdownMenuItem
|
||||
disabled={busy === 'connect'}
|
||||
onSelect={(event) => {
|
||||
event.preventDefault()
|
||||
void run(onRetry, 'connect')
|
||||
}}
|
||||
>
|
||||
{t('auto.components.status.bar.RemoteHostStatusRow.retry_now', 'Retry now')}
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
<DropdownMenuItem
|
||||
variant="destructive"
|
||||
disabled={busy === 'disconnect'}
|
||||
onSelect={(event) => {
|
||||
event.preventDefault()
|
||||
void run(onDisconnect, 'disconnect')
|
||||
}}
|
||||
>
|
||||
{reconnectCard && !errorSentence
|
||||
? t(
|
||||
'auto.components.status.bar.RemoteHostStatusRow.stop_reconnecting',
|
||||
'Stop reconnecting'
|
||||
)
|
||||
: t('auto.components.status.bar.SshStatusSegment.59b553e2aa', 'Disconnect')}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuSubContent>
|
||||
</DropdownMenuSub>
|
||||
) : (
|
||||
<DropdownMenuItem
|
||||
className={triggerClass}
|
||||
aria-label={rowName}
|
||||
onSelect={(event) => event.preventDefault()}
|
||||
>
|
||||
{details}
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{action}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,25 +1,13 @@
|
||||
import { useCallback, useRef, useState } from 'react'
|
||||
import { Loader2 } from 'lucide-react'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { useIntlLocale, useTranslate, type Translate } from '@/i18n/use-translate'
|
||||
import { formatUiRelativeTimeFromDate } from '@/i18n/relative-time-format'
|
||||
import { useMountedRef } from '@/hooks/useMountedRef'
|
||||
import {
|
||||
DropdownMenuItem,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubContent,
|
||||
DropdownMenuSubTrigger
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import '@/runtime/hosts/connections/runtime-host-connection-state'
|
||||
import {
|
||||
isConnectedRuntimeHostState,
|
||||
type RuntimeHostConnectionState
|
||||
} from '../../../../shared/remote-runtime/host-status/runtime-host-connection-state'
|
||||
import { useTranslate, type Translate } from '@/i18n/use-translate'
|
||||
import type { RuntimeHostConnectionState } from '../../../../shared/remote-runtime/host-status/runtime-host-connection-state'
|
||||
import type { RemoteRuntimeSharedConnectionDiagnostics } from '../../../../shared/remote-runtime/control/remote-runtime-shared-control-types'
|
||||
import type {
|
||||
RuntimeHostBlockedCopy,
|
||||
RuntimeHostBlockedRecovery
|
||||
} from './remote-host-connection-status'
|
||||
import { RemoteHostStatusRow } from './RemoteHostStatusRow'
|
||||
import type { HostRecoveryObservation } from './use-remote-host-menu-state'
|
||||
|
||||
function runtimeStatusLabel(state: RuntimeHostConnectionState, t: Translate = translate): string {
|
||||
switch (state) {
|
||||
@@ -44,314 +32,98 @@ function runtimeStatusLabel(state: RuntimeHostConnectionState, t: Translate = tr
|
||||
}
|
||||
}
|
||||
|
||||
function runtimeDotColor(state: RuntimeHostConnectionState): string {
|
||||
switch (state) {
|
||||
case 'connected':
|
||||
return 'bg-emerald-500'
|
||||
case 'workspace-window-closed':
|
||||
case 'checking':
|
||||
case 'reconnecting':
|
||||
case 'runtime-unavailable':
|
||||
return 'bg-yellow-500'
|
||||
case 'disconnected':
|
||||
return 'bg-muted-foreground/40'
|
||||
}
|
||||
}
|
||||
|
||||
function runtimeStatusTone(state: RuntimeHostConnectionState): string {
|
||||
if (
|
||||
state === 'checking' ||
|
||||
state === 'reconnecting' ||
|
||||
state === 'workspace-window-closed' ||
|
||||
state === 'runtime-unavailable'
|
||||
) {
|
||||
return 'text-yellow-500'
|
||||
}
|
||||
return 'text-muted-foreground'
|
||||
}
|
||||
|
||||
function runtimeActionLabel(
|
||||
state: RuntimeHostConnectionState,
|
||||
t: Translate = translate
|
||||
): string | null {
|
||||
switch (state) {
|
||||
case 'connected':
|
||||
case 'workspace-window-closed':
|
||||
case 'runtime-unavailable':
|
||||
return t('auto.components.status.bar.SshStatusSegment.59b553e2aa', 'Disconnect')
|
||||
case 'disconnected':
|
||||
return t('auto.components.status.bar.SshStatusSegment.63f36455cc', 'Connect')
|
||||
case 'checking':
|
||||
case 'reconnecting':
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
function runtimeFailureSummary(
|
||||
state: RuntimeHostConnectionState,
|
||||
t: Translate = translate
|
||||
): string {
|
||||
switch (state) {
|
||||
case 'connected':
|
||||
return t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.previous_connection_closed',
|
||||
'The previous connection closed'
|
||||
)
|
||||
case 'workspace-window-closed':
|
||||
return t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.workspace_window_closed',
|
||||
'The workspace window is closed'
|
||||
)
|
||||
case 'runtime-unavailable':
|
||||
return t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.runtime_unavailable',
|
||||
'SSH transport is connected, but the Orca runtime is unavailable'
|
||||
)
|
||||
case 'checking':
|
||||
return t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.checking_host',
|
||||
'Orca is checking whether this host is reachable'
|
||||
)
|
||||
case 'reconnecting':
|
||||
return t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.restoring_connection',
|
||||
'Orca is trying to restore the connection'
|
||||
)
|
||||
case 'disconnected':
|
||||
return t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.host_unreachable',
|
||||
'Orca isn’t reachable on this host'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function runtimeFailureExplanation(
|
||||
state: RuntimeHostConnectionState,
|
||||
t: Translate = translate
|
||||
): string | null {
|
||||
if (state === 'connected' || state === 'workspace-window-closed') {
|
||||
return null
|
||||
}
|
||||
if (state === 'runtime-unavailable') {
|
||||
return t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.runtime_unavailable_explanation',
|
||||
'The remote host may still be running; only the Orca runtime connection is unavailable.'
|
||||
)
|
||||
}
|
||||
return t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.contact_note',
|
||||
'The host may still be running; only the Orca connection is unavailable.'
|
||||
)
|
||||
}
|
||||
|
||||
export function RuntimeHostStatusRow({
|
||||
label,
|
||||
kind,
|
||||
state,
|
||||
detail,
|
||||
diagnostics,
|
||||
blocked,
|
||||
pending,
|
||||
recovery,
|
||||
now,
|
||||
onConnect,
|
||||
onDisconnect,
|
||||
onRecover
|
||||
}: {
|
||||
label: string
|
||||
kind?: string
|
||||
state: RuntimeHostConnectionState
|
||||
detail?: string
|
||||
diagnostics?: RemoteRuntimeSharedConnectionDiagnostics | null
|
||||
/** Set when the host refused this client; its copy replaces the transport state. */
|
||||
blocked?: (RuntimeHostBlockedCopy & { recovery: RuntimeHostBlockedRecovery | null }) | null
|
||||
onConnect?: () => Promise<void>
|
||||
onDisconnect?: () => Promise<void>
|
||||
onRecover?: () => void
|
||||
pending: boolean
|
||||
recovery?: HostRecoveryObservation
|
||||
now: number
|
||||
onConnect: () => Promise<void>
|
||||
onDisconnect: () => Promise<void>
|
||||
onRecover: () => void
|
||||
}): React.JSX.Element {
|
||||
const t = useTranslate()
|
||||
const intlLocale = useIntlLocale()
|
||||
const [busy, setBusy] = useState(false)
|
||||
const [submenuOpen, setSubmenuOpen] = useState(false)
|
||||
const actionPointerActiveRef = useRef(false)
|
||||
const mountedRef = useMountedRef()
|
||||
// Why: reconnecting a refused pairing is futile; only its recovery (a new pairing) gets back in.
|
||||
const repairs = Boolean(blocked?.recovery && onRecover)
|
||||
pending = pending && state !== 'connected' && state !== 'workspace-window-closed'
|
||||
blocked = pending ? null : blocked
|
||||
const transient = pending || state === 'checking' || state === 'reconnecting'
|
||||
const error = Boolean(blocked || state === 'runtime-unavailable')
|
||||
const repairs = Boolean(blocked?.recovery)
|
||||
const tone = blocked
|
||||
? 'error'
|
||||
: transient
|
||||
? 'busy'
|
||||
: error
|
||||
? 'error'
|
||||
: state === 'disconnected'
|
||||
? 'offline'
|
||||
: 'connected'
|
||||
const status =
|
||||
blocked?.label ??
|
||||
(state === 'reconnecting' || (transient && recovery?.attempt)
|
||||
? recovery?.attempt
|
||||
? t(
|
||||
'auto.components.status.bar.RemoteHostStatusRow.reconnecting_attempt',
|
||||
'Reconnecting (attempt {{attempt}})',
|
||||
{ attempt: String(recovery.attempt) }
|
||||
)
|
||||
: runtimeStatusLabel('reconnecting', t)
|
||||
: runtimeStatusLabel(pending ? 'checking' : state, t))
|
||||
const actionKind = repairs
|
||||
? 'recover'
|
||||
: transient && !blocked
|
||||
? 'disconnect'
|
||||
: error || state === 'disconnected'
|
||||
? 'connect'
|
||||
: 'disconnect'
|
||||
const actionLabel = repairs
|
||||
? blocked?.recovery === 'open-settings'
|
||||
? t('auto.components.status.bar.RuntimeHostStatusRow.open_settings', 'Open settings…')
|
||||
: t('auto.components.status.bar.RuntimeHostStatusRow.repair', 'Re-pair…')
|
||||
: blocked?.recovery
|
||||
? null
|
||||
: runtimeActionLabel(state, t)
|
||||
const transportAction = isConnectedRuntimeHostState(state) ? onDisconnect : onConnect
|
||||
const action = repairs ? onRecover : transportAction
|
||||
const hasSubmenu = Boolean(detail || blocked)
|
||||
|
||||
const handleAction = useCallback(async () => {
|
||||
if (repairs) {
|
||||
onRecover?.()
|
||||
return
|
||||
}
|
||||
if (!transportAction) {
|
||||
return
|
||||
}
|
||||
setBusy(true)
|
||||
try {
|
||||
await transportAction()
|
||||
} finally {
|
||||
if (mountedRef.current) {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
}, [mountedRef, onRecover, repairs, transportAction])
|
||||
|
||||
const lastConnectedLabel = diagnostics?.lastConnectedAt
|
||||
? t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.last_connected',
|
||||
'Last connected {{value0}}',
|
||||
{
|
||||
value0: formatUiRelativeTimeFromDate(
|
||||
new Date(diagnostics.lastConnectedAt).toISOString(),
|
||||
undefined,
|
||||
intlLocale
|
||||
)
|
||||
}
|
||||
)
|
||||
: null
|
||||
const reconnectAttemptLabel =
|
||||
diagnostics && state === 'reconnecting'
|
||||
? t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.reconnect_attempt',
|
||||
'Attempt {{value0}}',
|
||||
{ value0: String(diagnostics.reconnectAttempt + 1) }
|
||||
)
|
||||
: null
|
||||
const diagnosticLabel = [lastConnectedLabel, reconnectAttemptLabel].filter(Boolean).join(' · ')
|
||||
const rawDetail =
|
||||
blocked?.detail ?? diagnostics?.lastError ?? diagnostics?.lastClose?.reason ?? detail
|
||||
const failureSummary = blocked?.summary ?? runtimeFailureSummary(state, t)
|
||||
const failureExplanation = blocked ? blocked.explanation : runtimeFailureExplanation(state, t)
|
||||
const dotColor = blocked ? 'bg-destructive' : runtimeDotColor(state)
|
||||
const statusTone = blocked ? 'text-destructive' : runtimeStatusTone(state)
|
||||
const showSpinner = !blocked && (state === 'checking' || state === 'reconnecting')
|
||||
|
||||
const rowDetails = (
|
||||
<>
|
||||
<span aria-hidden="true" className={`size-1.5 shrink-0 rounded-full ${dotColor}`} />
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="truncate text-[12px] font-medium">{label}</div>
|
||||
<div className="flex min-w-0 items-center gap-1.5 text-[10px] text-muted-foreground">
|
||||
<span>
|
||||
{t('auto.components.status.bar.SshStatusSegment.remote_server', 'Remote Server')}
|
||||
</span>
|
||||
<span aria-hidden="true">·</span>
|
||||
<span className={`inline-flex min-w-0 items-center gap-1 ${statusTone}`}>
|
||||
{showSpinner ? <Loader2 className="size-2.5 shrink-0 animate-spin" /> : null}
|
||||
<span className="truncate">{blocked?.label ?? runtimeStatusLabel(state, t)}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
const actionButton = busy ? (
|
||||
<Loader2 className="size-3 shrink-0 animate-spin text-muted-foreground" />
|
||||
) : actionLabel && action ? (
|
||||
hasSubmenu ? (
|
||||
<span
|
||||
aria-hidden="true"
|
||||
onPointerEnter={() => {
|
||||
actionPointerActiveRef.current = true
|
||||
setSubmenuOpen(false)
|
||||
}}
|
||||
onPointerLeave={() => {
|
||||
actionPointerActiveRef.current = false
|
||||
}}
|
||||
onPointerMove={(event) => event.stopPropagation()}
|
||||
onPointerDown={(event) => {
|
||||
event.stopPropagation()
|
||||
}}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation()
|
||||
void handleAction()
|
||||
}}
|
||||
className="shrink-0 cursor-pointer rounded px-1.5 py-0.5 text-[10px] text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
||||
>
|
||||
{actionLabel}
|
||||
</span>
|
||||
) : (
|
||||
<button
|
||||
type="button"
|
||||
onPointerEnter={() => {
|
||||
actionPointerActiveRef.current = true
|
||||
setSubmenuOpen(false)
|
||||
}}
|
||||
onPointerLeave={() => {
|
||||
actionPointerActiveRef.current = false
|
||||
}}
|
||||
onPointerMove={(event) => event.stopPropagation()}
|
||||
onPointerDown={(event) => {
|
||||
event.stopPropagation()
|
||||
}}
|
||||
onClick={(event) => {
|
||||
event.stopPropagation()
|
||||
void handleAction()
|
||||
}}
|
||||
className="shrink-0 rounded px-1.5 py-0.5 text-[10px] text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
||||
>
|
||||
{actionLabel}
|
||||
</button>
|
||||
)
|
||||
) : null
|
||||
|
||||
if (!hasSubmenu) {
|
||||
return (
|
||||
<div className="flex items-center gap-2.5 px-2 py-1.5">
|
||||
{rowDetails}
|
||||
{actionButton}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
: transient && !blocked
|
||||
? t('auto.components.status.bar.RemoteHostStatusRow.stop', 'Stop')
|
||||
: error
|
||||
? t('auto.ssh.sshConnectVerb.retry', 'Retry')
|
||||
: actionKind === 'connect'
|
||||
? t('auto.components.status.bar.SshStatusSegment.63f36455cc', 'Connect')
|
||||
: t('auto.components.status.bar.SshStatusSegment.59b553e2aa', 'Disconnect')
|
||||
return (
|
||||
<DropdownMenuSub
|
||||
open={submenuOpen}
|
||||
onOpenChange={(open) => {
|
||||
if (!open || !actionPointerActiveRef.current) {
|
||||
setSubmenuOpen(open)
|
||||
}
|
||||
}}
|
||||
>
|
||||
<DropdownMenuSubTrigger className="gap-2.5 px-2 py-1.5" hideChevron>
|
||||
{rowDetails}
|
||||
{actionButton}
|
||||
</DropdownMenuSubTrigger>
|
||||
<DropdownMenuSubContent className="w-[min(18rem,calc(100vw-1rem))] p-1.5">
|
||||
<div className="px-1.5 pt-0.5 pb-1.5">
|
||||
<div className="text-[11px] font-semibold">{failureSummary}</div>
|
||||
{failureExplanation ? (
|
||||
<div className="mt-1 text-[11px] leading-4 text-muted-foreground">
|
||||
{failureExplanation}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
{rawDetail ? (
|
||||
<div className="mx-1 mb-1.5 max-h-24 overflow-y-auto scrollbar-sleek whitespace-pre-wrap break-words rounded-md bg-muted px-2 py-1.5 font-mono text-[10px] leading-4 text-muted-foreground [overflow-wrap:anywhere]">
|
||||
{rawDetail}
|
||||
</div>
|
||||
) : null}
|
||||
{diagnosticLabel ? (
|
||||
<div className="px-1.5 pb-1.5 text-[10px] text-muted-foreground">{diagnosticLabel}</div>
|
||||
) : null}
|
||||
{actionLabel && action ? (
|
||||
<DropdownMenuItem
|
||||
disabled={busy}
|
||||
onSelect={(event) => {
|
||||
event.preventDefault()
|
||||
void handleAction()
|
||||
}}
|
||||
>
|
||||
{busy ? <Loader2 className="size-3 animate-spin" /> : null}
|
||||
{actionLabel}
|
||||
</DropdownMenuItem>
|
||||
) : null}
|
||||
</DropdownMenuSubContent>
|
||||
</DropdownMenuSub>
|
||||
<RemoteHostStatusRow
|
||||
label={label}
|
||||
kind={kind}
|
||||
tone={tone}
|
||||
status={status}
|
||||
actionLabel={actionLabel}
|
||||
actionKind={actionKind}
|
||||
onAction={repairs ? onRecover : actionKind === 'connect' ? onConnect : onDisconnect}
|
||||
errorSentence={
|
||||
blocked?.summary ??
|
||||
(!transient && state === 'runtime-unavailable'
|
||||
? t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.contact_note',
|
||||
'The host may still be running; only the Orca connection is unavailable.'
|
||||
)
|
||||
: undefined)
|
||||
}
|
||||
rawDetail={blocked?.detail ?? diagnostics?.lastError ?? diagnostics?.lastClose?.reason}
|
||||
recovery={recovery}
|
||||
now={now}
|
||||
onRetry={onConnect}
|
||||
onDisconnect={onDisconnect}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,15 +1,52 @@
|
||||
// @vitest-environment happy-dom
|
||||
import type { PropsWithChildren } from 'react'
|
||||
import { cleanup, fireEvent, render, screen } from '@testing-library/react'
|
||||
import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import type { GlobalSettings } from '../../../../shared/global-settings-types'
|
||||
import type { PublicKnownRuntimeEnvironment } from '../../../../shared/remote-runtime/host-catalog/runtime-environments'
|
||||
import type { RuntimeEnvironmentStatus } from '../../../../shared/remote-runtime/host-status/runtime-host-status'
|
||||
import type { SshConnectionState, SshConnectionStatus } from '../../../../shared/ssh-types'
|
||||
import type { Repo } from '../../../../shared/repo-types'
|
||||
import { TooltipProvider } from '@/components/ui/tooltip'
|
||||
import { SshStatusSegment } from './SshStatusSegment'
|
||||
import { HOST_LIST_ROW_LIMIT } from '../host-picker/bounded-host-list'
|
||||
import { SSH_STATUS_MENU_IDLE_ROW_LIMIT } from './ssh-status-menu-rows'
|
||||
import type * as RegistryModule from '../../../../shared/execution-host/execution-host-registry'
|
||||
import type * as MenuRowsModule from './ssh-status-menu-rows'
|
||||
import type * as ConnectionStatusModule from './remote-host-connection-status'
|
||||
import { connectRuntimeHostAndReloadProjects } from './runtime-environment-explicit-connect'
|
||||
|
||||
const inventoryVisits = vi.hoisted(() => ({ registry: 0, split: 0, overall: 0 }))
|
||||
vi.mock('../../../../shared/execution-host/execution-host-registry', async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof RegistryModule>()
|
||||
return {
|
||||
...actual,
|
||||
buildExecutionHostRegistry: (...args: Parameters<typeof actual.buildExecutionHostRegistry>) => {
|
||||
inventoryVisits.registry += args[0].sshTargetLabels?.size ?? 0
|
||||
return actual.buildExecutionHostRegistry(...args)
|
||||
}
|
||||
}
|
||||
})
|
||||
vi.mock('./ssh-status-menu-rows', async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof MenuRowsModule>()
|
||||
return {
|
||||
...actual,
|
||||
splitSshStatusMenuRows: (...args: Parameters<typeof actual.splitSshStatusMenuRows>) => {
|
||||
inventoryVisits.split += args[0].length
|
||||
return actual.splitSshStatusMenuRows(...args)
|
||||
}
|
||||
}
|
||||
})
|
||||
vi.mock('./remote-host-connection-status', async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof ConnectionStatusModule>()
|
||||
return {
|
||||
...actual,
|
||||
sshStatusForOverall: (...args: Parameters<typeof actual.sshStatusForOverall>) => {
|
||||
inventoryVisits.overall += 1
|
||||
return actual.sshStatusForOverall(...args)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function noSettings(): GlobalSettings | null {
|
||||
return null
|
||||
@@ -37,10 +74,21 @@ vi.mock('../../store', () => {
|
||||
vi.mock('../../lib/ssh-config-passive-sync', () => ({
|
||||
syncSshConfigTargetsPassively: vi.fn(async () => undefined)
|
||||
}))
|
||||
vi.mock('./runtime-environment-explicit-connect', () => ({
|
||||
connectRuntimeHostAndReloadProjects: vi.fn(async () => false)
|
||||
}))
|
||||
vi.mock('@/components/ui/dropdown-menu', () => {
|
||||
const content = ({ children }: PropsWithChildren) => <div>{children}</div>
|
||||
return {
|
||||
DropdownMenu: content,
|
||||
DropdownMenu: ({
|
||||
children,
|
||||
onOpenChange
|
||||
}: PropsWithChildren<{ onOpenChange?: (open: boolean) => void }>) => (
|
||||
<div>
|
||||
<button onClick={() => onOpenChange?.(true)}>Open hosts fixture</button>
|
||||
{children}
|
||||
</div>
|
||||
),
|
||||
DropdownMenuContent: content,
|
||||
DropdownMenuItem: ({ children, onSelect }: PropsWithChildren<{ onSelect?: () => void }>) => (
|
||||
<div role="menuitem" onClick={onSelect}>
|
||||
@@ -64,6 +112,8 @@ function connectionState(targetId: string, status: SshConnectionStatus): SshConn
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
state.runtimeEnvironments = []
|
||||
state.runtimeStatusByEnvironmentId = new Map()
|
||||
state.sshTargetLabels = new Map(
|
||||
Array.from({ length: IMPORTED_HOST_COUNT }, (_, index) => [
|
||||
`ssh-${index}`,
|
||||
@@ -79,18 +129,85 @@ beforeEach(() => {
|
||||
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
vi.useRealTimers()
|
||||
})
|
||||
|
||||
describe('the status menu with a very large imported SSH host list', () => {
|
||||
it.each([13_692, 136_920])(
|
||||
'does no inventory work for local recovery/clock updates with %i hosts',
|
||||
async (count) => {
|
||||
vi.useFakeTimers()
|
||||
vi.setSystemTime(10_000)
|
||||
state.sshTargetLabels = new Map(
|
||||
Array.from({ length: count }, (_, index) => [`ssh-${index}`, `node-${index}`])
|
||||
)
|
||||
state.sshConnectionStates = new Map()
|
||||
inventoryVisits.registry = inventoryVisits.split = inventoryVisits.overall = 0
|
||||
const element = (
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
const view = render(element)
|
||||
expect(inventoryVisits).toEqual({ registry: count, split: count, overall: count })
|
||||
// One actual status input changes; its closed-menu observation adjustment must reuse that inventory.
|
||||
state.sshConnectionStates = new Map([['ssh-0', connectionState('ssh-0', 'reconnecting')]])
|
||||
view.rerender(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
expect(inventoryVisits).toEqual({ registry: count * 2, split: count * 2, overall: count * 2 })
|
||||
state.sshConnectionStates = new Map([
|
||||
['ssh-0', { ...connectionState('ssh-0', 'reconnecting'), reconnectAttempt: 1 }]
|
||||
])
|
||||
view.rerender(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
expect(inventoryVisits).toEqual({ registry: count * 3, split: count * 3, overall: count * 3 })
|
||||
fireEvent.click(screen.getByRole('button', { name: 'Open hosts fixture' }))
|
||||
await act(() => vi.advanceTimersByTimeAsync(30_000))
|
||||
expect(screen.getByRole('menuitem', { name: 'Retry now' })).toBeTruthy()
|
||||
expect(inventoryVisits).toEqual({ registry: count * 3, split: count * 3, overall: count * 3 })
|
||||
// A meaningful catalog change still rebuilds and renders the added host.
|
||||
state.sshTargetLabels = new Map(state.sshTargetLabels).set('live', 'New live host')
|
||||
state.sshConnectionStates = new Map(state.sshConnectionStates).set(
|
||||
'live',
|
||||
connectionState('live', 'connected')
|
||||
)
|
||||
view.rerender(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
expect(screen.getByText('New live host')).toBeTruthy()
|
||||
expect(inventoryVisits).toEqual({
|
||||
registry: count * 4 + 1,
|
||||
split: count * 4 + 1,
|
||||
overall: count * 4 + 1
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
it('renders a bounded number of idle host rows instead of one per imported host', () => {
|
||||
render(<SshStatusSegment compact={false} iconOnly={false} />)
|
||||
render(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
const connectButtons = screen.queryAllByRole('button', { name: 'Connect' })
|
||||
expect(connectButtons.length).toBeLessThanOrEqual(SSH_STATUS_MENU_IDLE_ROW_LIMIT + 1)
|
||||
expect(document.body.getElementsByTagName('*').length).toBeLessThan(2_000)
|
||||
})
|
||||
|
||||
it('always lists connected and in-progress hosts, wherever they sit in the list', () => {
|
||||
render(<SshStatusSegment compact={false} iconOnly={false} />)
|
||||
render(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
expect(screen.getByText('node-09000')).toBeTruthy()
|
||||
expect(screen.getByText('node-13000')).toBeTruthy()
|
||||
expect(screen.getByText('node-00000')).toBeTruthy()
|
||||
@@ -101,7 +218,11 @@ describe('the status menu with a very large imported SSH host list', () => {
|
||||
const connect = vi.fn(async () => undefined)
|
||||
vi.stubGlobal('api', { ssh: { connect } })
|
||||
state.sshConnectionStates.set('ssh-5', connectionState('ssh-5', 'auth-failed'))
|
||||
render(<SshStatusSegment compact={false} iconOnly={false} />)
|
||||
render(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
const hidden = IMPORTED_HOST_COUNT - 3 - SSH_STATUS_MENU_IDLE_ROW_LIMIT
|
||||
fireEvent.click(screen.getByRole('menuitem', { name: `Find among ${hidden} more SSH hosts…` }))
|
||||
const search = await screen.findByRole('combobox')
|
||||
@@ -114,8 +235,96 @@ describe('the status menu with a very large imported SSH host list', () => {
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
|
||||
it('keeps a pending retry visible when SSH replacement briefly publishes disconnected', async () => {
|
||||
let resolveConnect: () => void = () => undefined
|
||||
const request = new Promise<void>((resolve) => {
|
||||
resolveConnect = resolve
|
||||
})
|
||||
vi.stubGlobal('api', { ssh: { connect: vi.fn(() => request) } })
|
||||
state.sshConnectionStates.set('ssh-13000', {
|
||||
...connectionState('ssh-13000', 'reconnecting'),
|
||||
reconnectAttempt: 2
|
||||
})
|
||||
const view = render(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
fireEvent.click(screen.getByRole('menuitem', { name: 'Retry now' }))
|
||||
state.sshConnectionStates = new Map(state.sshConnectionStates).set(
|
||||
'ssh-13000',
|
||||
connectionState('ssh-13000', 'disconnected')
|
||||
)
|
||||
view.rerender(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
expect(screen.getByText('node-13000')).toBeTruthy()
|
||||
expect(screen.getByRole('button', { name: 'Stop node-13000' })).toBeTruthy()
|
||||
resolveConnect()
|
||||
await vi.waitFor(() => expect(screen.queryByText('node-13000')).toBeNull())
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
|
||||
it('does not reuse a stopped server’s retry count on a new Connect', async () => {
|
||||
let resolveConnect: (value: boolean) => void = () => undefined
|
||||
vi.mocked(connectRuntimeHostAndReloadProjects).mockImplementationOnce(
|
||||
() =>
|
||||
new Promise<boolean>((resolve) => {
|
||||
resolveConnect = resolve
|
||||
})
|
||||
)
|
||||
state.sshTargetLabels = new Map()
|
||||
state.sshConnectionStates = new Map()
|
||||
state.runtimeEnvironments = [
|
||||
{
|
||||
id: 'server',
|
||||
name: 'Server',
|
||||
createdAt: 0,
|
||||
updatedAt: 0,
|
||||
lastUsedAt: null,
|
||||
runtimeId: null,
|
||||
source: 'manual',
|
||||
preferredEndpointId: 'direct',
|
||||
endpoints: [
|
||||
{ id: 'direct', kind: 'websocket', label: 'Direct', endpoint: 'ws://127.0.0.1:1' }
|
||||
]
|
||||
}
|
||||
]
|
||||
state.runtimeStatusByEnvironmentId.set('server', {
|
||||
status: null,
|
||||
checkedAt: 0,
|
||||
remoteControl: {
|
||||
state: 'closed',
|
||||
reconnectAttempt: 7,
|
||||
pendingRequestCount: 0,
|
||||
subscriptionCount: 0,
|
||||
lastConnectedAt: null,
|
||||
lastClose: null,
|
||||
lastError: null
|
||||
}
|
||||
})
|
||||
render(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
fireEvent.click(screen.getByRole('button', { name: 'Connect Server' }))
|
||||
await vi.waitFor(() => expect(screen.getByRole('button', { name: 'Stop Server' })).toBeTruthy())
|
||||
expect(screen.queryByRole('menuitem', { name: 'Retry now' })).toBeNull()
|
||||
resolveConnect(false)
|
||||
await vi.waitFor(() =>
|
||||
expect(screen.getByRole('button', { name: 'Connect Server' })).toBeTruthy()
|
||||
)
|
||||
})
|
||||
|
||||
it('caps the search results and says how many more match', async () => {
|
||||
render(<SshStatusSegment compact={false} iconOnly={false} />)
|
||||
render(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
fireEvent.click(screen.getByRole('menuitem', { name: /^Find among/ }))
|
||||
const search = await screen.findByRole('combobox')
|
||||
fireEvent.change(search, { target: { value: 'node-1' } })
|
||||
@@ -126,7 +335,11 @@ describe('the status menu with a very large imported SSH host list', () => {
|
||||
})
|
||||
|
||||
it('returns focus to the status button when the search is closed from the keyboard', async () => {
|
||||
render(<SshStatusSegment compact={false} iconOnly={false} />)
|
||||
render(
|
||||
<TooltipProvider>
|
||||
<SshStatusSegment compact={false} iconOnly={false} />
|
||||
</TooltipProvider>
|
||||
)
|
||||
fireEvent.click(screen.getByRole('menuitem', { name: /^Find among/ }))
|
||||
const search = await screen.findByRole('combobox')
|
||||
search.focus()
|
||||
|
||||
@@ -9,38 +9,31 @@ import {
|
||||
DropdownMenuTrigger
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { useAppStore } from '../../store'
|
||||
import type { SshConnectionStatus } from '../../../../shared/ssh-types'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
import { getHostDisplayLabelOverrides } from '../../../../shared/host-setting-overrides'
|
||||
import {
|
||||
isOwnedSshTargetId,
|
||||
parseExecutionHostId,
|
||||
toRuntimeExecutionHostId,
|
||||
toSshExecutionHostId
|
||||
} from '../../../../shared/execution-host'
|
||||
import { buildExecutionHostRegistry } from '../../../../shared/execution-host/execution-host-registry'
|
||||
import { pickerExecutionHosts } from '../../../../shared/execution-host/managed-orcad-execution-host'
|
||||
import {
|
||||
isListedRemoteServer,
|
||||
runtimePairingRepairRoute
|
||||
} from '../../../../shared/remote-runtime/host-catalog/runtime-environments'
|
||||
import { buildRemoteHostMenuInventory } from './remote-host-menu-inventory'
|
||||
import { RuntimeHostStatusRow } from './RuntimeHostStatusRow'
|
||||
import { connectedHostCountLabel, moreSshHostsLabel } from './ssh-status-segment-copy'
|
||||
import { SshHostFindPopover } from './SshHostFindPopover'
|
||||
import { splitSshStatusMenuRows } from './ssh-status-menu-rows'
|
||||
import { SshTargetStatusRow } from './SshTargetStatusRow'
|
||||
import {
|
||||
SshTargetStatusRow,
|
||||
connectSshTargetFromStatusMenu,
|
||||
disconnectSshTargetFromStatusMenu
|
||||
} from './SshTargetStatusRow'
|
||||
import { useRemoteHostMenuState } from './use-remote-host-menu-state'
|
||||
import { isConnectingSshStatus } from '@/ssh/ssh-connection-recoverability'
|
||||
import { syncSshConfigTargetsPassively } from '../../lib/ssh-config-passive-sync'
|
||||
import { connectRuntimeHostAndReloadProjects } from './runtime-environment-explicit-connect'
|
||||
import {
|
||||
runtimeHostBlockedCopy,
|
||||
runtimeHostBlockedRecovery,
|
||||
runtimeHostConnectionDetail,
|
||||
runtimeHostStatusForOverall,
|
||||
sshStatusForOverall,
|
||||
ambiguousRemoteHostNames,
|
||||
type RuntimeHostBlockedRecovery
|
||||
} from './remote-host-connection-status'
|
||||
import { runtimeHostConnectionStateForEntry } from '@/runtime/hosts/connections/runtime-host-connection-state'
|
||||
import { isConnectedRuntimeHostState } from '../../../../shared/remote-runtime/host-status/runtime-host-connection-state'
|
||||
import { RuntimeRepairDialog } from '../runtime-access/RuntimeRepairDialog'
|
||||
|
||||
export function SshStatusSegment({
|
||||
@@ -71,85 +64,112 @@ export function SshStatusSegment({
|
||||
() => new Set(repos.flatMap((repo) => (repo.connectionId ? [repo.connectionId] : []))),
|
||||
[repos]
|
||||
)
|
||||
const hostLabelOverrides = useMemo(() => getHostDisplayLabelOverrides(settings), [settings])
|
||||
const userManagedEnvironments = runtimeEnvironments.filter(isListedRemoteServer)
|
||||
// Why the registry: a managed server and its SSH host are one machine, shown on its active route.
|
||||
const visibleHosts = new Map(
|
||||
pickerExecutionHosts(
|
||||
buildExecutionHostRegistry({
|
||||
repos: [],
|
||||
settings,
|
||||
hostSource: 'configured-only',
|
||||
sshTargetLabels,
|
||||
sshConnectionStates,
|
||||
runtimeEnvironments: userManagedEnvironments,
|
||||
runtimeStatusByEnvironmentId,
|
||||
hostLabelOverrides
|
||||
})
|
||||
).map((host) => [host.id, host])
|
||||
const {
|
||||
targets,
|
||||
runtimeHostRows,
|
||||
connectedRuntimeHosts,
|
||||
inactiveRuntimeHosts,
|
||||
connectedHostCount,
|
||||
hostCount
|
||||
} = useMemo(
|
||||
() =>
|
||||
buildRemoteHostMenuInventory(
|
||||
{
|
||||
runtimeEnvironments,
|
||||
settings,
|
||||
sshTargetLabels,
|
||||
sshConnectionStates,
|
||||
runtimeStatusByEnvironmentId
|
||||
},
|
||||
t
|
||||
),
|
||||
[
|
||||
runtimeEnvironments,
|
||||
settings,
|
||||
sshTargetLabels,
|
||||
sshConnectionStates,
|
||||
runtimeStatusByEnvironmentId,
|
||||
t
|
||||
]
|
||||
)
|
||||
const targets = Array.from(sshTargetLabels.entries())
|
||||
// Hide runtime-owned per-workspace SSH targets from the user-managed host list.
|
||||
.filter(([id]) => !isOwnedSshTargetId(id) && visibleHosts.has(toSshExecutionHostId(id)))
|
||||
.map(([id, label]) => {
|
||||
const state = sshConnectionStates.get(id)
|
||||
return {
|
||||
id,
|
||||
label: visibleHosts.get(toSshExecutionHostId(id))?.label || label,
|
||||
status: state?.status ?? ('disconnected' satisfies SshConnectionStatus)
|
||||
}
|
||||
})
|
||||
const runtimeHosts = userManagedEnvironments
|
||||
.filter((environment) => visibleHosts.has(toRuntimeExecutionHostId(environment.id)))
|
||||
.map((environment) => {
|
||||
const statusEntry = runtimeStatusByEnvironmentId.get(environment.id)
|
||||
const registryHost = visibleHosts.get(toRuntimeExecutionHostId(environment.id))
|
||||
// Why the registry's verdict: it is the same blocked reason the sidebar and Settings show.
|
||||
const blockedReason =
|
||||
registryHost?.health === 'blocked' ? registryHost.blockedReason : undefined
|
||||
const repairRoute = runtimePairingRepairRoute(environment)
|
||||
return {
|
||||
id: environment.id,
|
||||
label: registryHost?.label || environment.name || environment.id,
|
||||
blockedReason,
|
||||
blocked: blockedReason
|
||||
? {
|
||||
...runtimeHostBlockedCopy(blockedReason, registryHost?.compatibility, repairRoute, t),
|
||||
recovery: runtimeHostBlockedRecovery(blockedReason, repairRoute)
|
||||
}
|
||||
: null,
|
||||
snapshot: statusEntry?.snapshot,
|
||||
status: statusEntry?.status ?? null,
|
||||
active: settings?.activeRuntimeEnvironmentId === environment.id,
|
||||
remoteControl: statusEntry?.remoteControl ?? statusEntry?.status?.remoteControl ?? null
|
||||
}
|
||||
})
|
||||
const runtimeHostRows = runtimeHosts.map((host) => ({
|
||||
...host,
|
||||
state: runtimeHostConnectionStateForEntry(runtimeStatusByEnvironmentId.get(host.id))
|
||||
}))
|
||||
// Host health is independent of active runtime selection; available remote servers remain online.
|
||||
const connectedRuntimeHosts = runtimeHostRows.filter((host) =>
|
||||
isConnectedRuntimeHostState(host.state)
|
||||
)
|
||||
const inactiveRuntimeHosts = runtimeHostRows.filter(
|
||||
(host) => !isConnectedRuntimeHostState(host.state)
|
||||
const hostExists = useCallback(
|
||||
(id: string) => {
|
||||
const host = parseExecutionHostId(id)
|
||||
return host?.kind === 'ssh'
|
||||
? sshTargetLabels.has(host.targetId)
|
||||
: host?.kind === 'runtime' &&
|
||||
runtimeEnvironments.some((environment) => environment.id === host.environmentId)
|
||||
},
|
||||
[sshTargetLabels, runtimeEnvironments]
|
||||
)
|
||||
const menu = useRemoteHostMenuState(menuOpen, hostExists)
|
||||
const { connect: trackConnect, cancel: cancelConnect } = menu
|
||||
const {
|
||||
connected: connectedTargets,
|
||||
inactive: disconnectedTargets,
|
||||
hiddenIdleCount
|
||||
} = splitSshStatusMenuRows(targets, { projectHostIds })
|
||||
} = useMemo(() => {
|
||||
const pendingTargetIds = new Set<string>()
|
||||
for (const id of menu.pending) {
|
||||
const host = parseExecutionHostId(id)
|
||||
if (host?.kind === 'ssh') {
|
||||
pendingTargetIds.add(host.targetId)
|
||||
}
|
||||
}
|
||||
return splitSshStatusMenuRows(targets, { projectHostIds, pendingTargetIds })
|
||||
}, [targets, projectHostIds, menu.pending])
|
||||
const displayedTargets = [...connectedTargets, ...disconnectedTargets]
|
||||
const displayedHosts = [...connectedRuntimeHosts, ...inactiveRuntimeHosts]
|
||||
menu.observe([
|
||||
...displayedHosts.map((host) => ({
|
||||
id: toRuntimeExecutionHostId(host.id),
|
||||
recovering:
|
||||
(menu.pending.has(toRuntimeExecutionHostId(host.id)) &&
|
||||
host.state !== 'connected' &&
|
||||
host.state !== 'workspace-window-closed') ||
|
||||
(!host.blocked && (host.state === 'checking' || host.state === 'reconnecting')),
|
||||
attempt:
|
||||
host.remoteControl?.state === 'reconnecting' ? host.remoteControl.reconnectAttempt : 0
|
||||
})),
|
||||
...displayedTargets.map((target) => ({
|
||||
id: toSshExecutionHostId(target.id),
|
||||
recovering:
|
||||
(menu.pending.has(toSshExecutionHostId(target.id)) && target.status !== 'connected') ||
|
||||
isConnectingSshStatus(target.status),
|
||||
attempt: target.status === 'reconnecting' ? (target.reconnectAttempt ?? 0) + 1 : 0
|
||||
}))
|
||||
])
|
||||
const ambiguousNames = ambiguousRemoteHostNames(displayedHosts, displayedTargets)
|
||||
const runtimeKind = (label: string) =>
|
||||
ambiguousNames.has(label)
|
||||
? t('auto.components.status.bar.RemoteHostStatusRow.server', 'Server')
|
||||
: undefined
|
||||
const sshKind = (label: string) =>
|
||||
ambiguousNames.has(label)
|
||||
? t('auto.components.status.bar.RemoteHostStatusRow.ssh', 'SSH')
|
||||
: undefined
|
||||
const connectSshHost = (id: string) =>
|
||||
trackConnect(toSshExecutionHostId(id), (signal) => connectSshTargetFromStatusMenu(id, signal))
|
||||
const disconnectSshHost = async (id: string) => {
|
||||
cancelConnect(toSshExecutionHostId(id))
|
||||
await disconnectSshTargetFromStatusMenu(id)
|
||||
}
|
||||
const connectRuntimeHost = useCallback(
|
||||
async (environmentId: string): Promise<void> => {
|
||||
if (await connectRuntimeHostAndReloadProjects(environmentId)) {
|
||||
recordFeatureInteraction('ssh')
|
||||
}
|
||||
await trackConnect(toRuntimeExecutionHostId(environmentId), async (signal) => {
|
||||
if (
|
||||
(await connectRuntimeHostAndReloadProjects(environmentId, undefined, signal)) &&
|
||||
!signal.aborted
|
||||
) {
|
||||
recordFeatureInteraction('ssh')
|
||||
}
|
||||
})
|
||||
},
|
||||
[recordFeatureInteraction]
|
||||
[trackConnect, recordFeatureInteraction]
|
||||
)
|
||||
const disconnectRuntimeHost = useCallback(
|
||||
async (environmentId: string): Promise<void> => {
|
||||
cancelConnect(toRuntimeExecutionHostId(environmentId))
|
||||
try {
|
||||
await window.api.runtimeEnvironments.disconnect({ selector: environmentId })
|
||||
await readRuntimeHostStatusSnapshots()
|
||||
@@ -165,18 +185,13 @@ export function SshStatusSegment({
|
||||
)
|
||||
}
|
||||
},
|
||||
[recordFeatureInteraction, readRuntimeHostStatusSnapshots]
|
||||
[cancelConnect, recordFeatureInteraction, readRuntimeHostStatusSnapshots]
|
||||
)
|
||||
|
||||
if (targets.length === 0 && runtimeHosts.length === 0) {
|
||||
if (hostCount === 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
const statuses = [
|
||||
...targets.map((target) => sshStatusForOverall(target.status)),
|
||||
...runtimeHostRows.map((host) => runtimeHostStatusForOverall(host.state, host.blockedReason))
|
||||
]
|
||||
const connectedHostCount = statuses.filter((status) => status === 'connected').length
|
||||
const openRecovery = (host: {
|
||||
id: string
|
||||
label: string
|
||||
@@ -192,6 +207,37 @@ export function SshStatusSegment({
|
||||
}
|
||||
setRepairTarget({ id: host.id, label: host.label })
|
||||
}
|
||||
const renderRuntimeHost = (host: (typeof runtimeHostRows)[number]) => (
|
||||
<RuntimeHostStatusRow
|
||||
key={host.id}
|
||||
label={host.label}
|
||||
kind={runtimeKind(host.label)}
|
||||
pending={menu.pending.has(toRuntimeExecutionHostId(host.id))}
|
||||
recovery={menu.observations.get(toRuntimeExecutionHostId(host.id))}
|
||||
now={menu.now}
|
||||
state={host.state}
|
||||
diagnostics={host.remoteControl}
|
||||
blocked={host.blocked}
|
||||
onConnect={() => connectRuntimeHost(host.id)}
|
||||
onDisconnect={() => disconnectRuntimeHost(host.id)}
|
||||
onRecover={() => openRecovery(host)}
|
||||
/>
|
||||
)
|
||||
const renderSshTarget = (target: (typeof targets)[number]) => (
|
||||
<SshTargetStatusRow
|
||||
key={target.id}
|
||||
targetId={target.id}
|
||||
label={target.label}
|
||||
kind={sshKind(target.label)}
|
||||
error={target.error}
|
||||
pending={menu.pending.has(toSshExecutionHostId(target.id))}
|
||||
recovery={menu.observations.get(toSshExecutionHostId(target.id))}
|
||||
now={menu.now}
|
||||
onConnect={() => connectSshHost(target.id)}
|
||||
onDisconnect={() => disconnectSshHost(target.id)}
|
||||
status={target.status}
|
||||
/>
|
||||
)
|
||||
return (
|
||||
<DropdownMenu
|
||||
open={menuOpen}
|
||||
@@ -226,7 +272,7 @@ export function SshStatusSegment({
|
||||
{connectedHostCountLabel(1, t)}
|
||||
</span>
|
||||
<span aria-hidden className="invisible col-start-1 row-start-1">
|
||||
{connectedHostCountLabel(Math.max(99, statuses.length), t)}
|
||||
{connectedHostCountLabel(Math.max(99, hostCount), t)}
|
||||
</span>
|
||||
<span className="col-start-1 row-start-1">
|
||||
{connectedHostCountLabel(connectedHostCount, t)}
|
||||
@@ -249,51 +295,13 @@ export function SshStatusSegment({
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className="px-2 pt-1.5 pb-1 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground">
|
||||
{t('auto.components.status.bar.SshStatusSegment.6e8a9a4242', 'Remote Hosts')}
|
||||
<div className="px-2 pt-1.5 pb-1 text-xs text-muted-foreground">
|
||||
{t('auto.components.status.bar.SshStatusSegment.6e8a9a4242', 'Remote hosts')}
|
||||
</div>
|
||||
{connectedRuntimeHosts.map((host) => (
|
||||
<RuntimeHostStatusRow
|
||||
key={host.id}
|
||||
label={host.label}
|
||||
state={host.state}
|
||||
detail={runtimeHostConnectionDetail(host.remoteControl, t)}
|
||||
diagnostics={host.remoteControl}
|
||||
blocked={host.blocked}
|
||||
onConnect={() => connectRuntimeHost(host.id)}
|
||||
onDisconnect={() => disconnectRuntimeHost(host.id)}
|
||||
onRecover={() => openRecovery(host)}
|
||||
/>
|
||||
))}
|
||||
{connectedTargets.map((target) => (
|
||||
<SshTargetStatusRow
|
||||
key={target.id}
|
||||
targetId={target.id}
|
||||
label={target.label}
|
||||
status={target.status}
|
||||
/>
|
||||
))}
|
||||
{inactiveRuntimeHosts.map((host) => (
|
||||
<RuntimeHostStatusRow
|
||||
key={host.id}
|
||||
label={host.label}
|
||||
state={host.state}
|
||||
detail={runtimeHostConnectionDetail(host.remoteControl, t)}
|
||||
diagnostics={host.remoteControl}
|
||||
blocked={host.blocked}
|
||||
onConnect={() => connectRuntimeHost(host.id)}
|
||||
onDisconnect={() => disconnectRuntimeHost(host.id)}
|
||||
onRecover={() => openRecovery(host)}
|
||||
/>
|
||||
))}
|
||||
{disconnectedTargets.map((target) => (
|
||||
<SshTargetStatusRow
|
||||
key={target.id}
|
||||
targetId={target.id}
|
||||
label={target.label}
|
||||
status={target.status}
|
||||
/>
|
||||
))}
|
||||
{connectedRuntimeHosts.map(renderRuntimeHost)}
|
||||
{connectedTargets.map(renderSshTarget)}
|
||||
{inactiveRuntimeHosts.map(renderRuntimeHost)}
|
||||
{disconnectedTargets.map(renderSshTarget)}
|
||||
{hiddenIdleCount > 0 ? (
|
||||
// Why a search and not a Settings link: web clients connect hosts here but have no SSH pane.
|
||||
<DropdownMenuItem onSelect={() => setFindOpen(true)}>
|
||||
@@ -308,7 +316,7 @@ export function SshStatusSegment({
|
||||
setActiveView('settings')
|
||||
}}
|
||||
>
|
||||
{t('auto.components.status.bar.SshStatusSegment.3ad70e0365', 'Manage Remote Hosts…')}
|
||||
{t('auto.components.status.bar.SshStatusSegment.3ad70e0365', 'Manage remote hosts…')}
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
<SshHostFindPopover
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import { useCallback, useState } from 'react'
|
||||
import { Loader2 } from 'lucide-react'
|
||||
import { toast } from 'sonner'
|
||||
import { toastSshConnectFailure } from '@/ssh/ssh-connect-failure-toast'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { useTranslate } from '@/i18n/use-translate'
|
||||
import { useMountedRef } from '@/hooks/useMountedRef'
|
||||
import { RemoteHostStatusRow } from './RemoteHostStatusRow'
|
||||
import type { HostRecoveryObservation } from './use-remote-host-menu-state'
|
||||
import { useAppStore } from '../../store'
|
||||
import { STATUS_LABELS, statusColor } from '../settings/ssh/targets/SshTargetCard'
|
||||
import { canConnectSshStatus } from '@/ssh/ssh-connection-recoverability'
|
||||
import { STATUS_LABELS } from '../settings/ssh/targets/SshTargetCard'
|
||||
import { sshConnectVerb } from '@/ssh/ssh-connect-verb'
|
||||
import {
|
||||
beginSshConnect,
|
||||
@@ -17,15 +15,23 @@ import {
|
||||
} from '@/ssh/ssh-connect-in-flight'
|
||||
import type { SshConnectionStatus } from '../../../../shared/ssh-types'
|
||||
|
||||
export async function connectSshTargetFromStatusMenu(targetId: string): Promise<void> {
|
||||
export async function connectSshTargetFromStatusMenu(
|
||||
targetId: string,
|
||||
signal?: AbortSignal
|
||||
): Promise<void> {
|
||||
if (isSshConnectInFlight(targetId)) {
|
||||
return
|
||||
}
|
||||
beginSshConnect(targetId)
|
||||
try {
|
||||
await window.api.ssh.connect({ targetId })
|
||||
useAppStore.getState().recordFeatureInteraction('ssh')
|
||||
if (!signal?.aborted) {
|
||||
useAppStore.getState().recordFeatureInteraction('ssh')
|
||||
}
|
||||
} catch (err) {
|
||||
if (signal?.aborted) {
|
||||
return
|
||||
}
|
||||
toastSshConnectFailure(
|
||||
targetId,
|
||||
err,
|
||||
@@ -36,81 +42,100 @@ export async function connectSshTargetFromStatusMenu(targetId: string): Promise<
|
||||
}
|
||||
}
|
||||
|
||||
export async function disconnectSshTargetFromStatusMenu(targetId: string): Promise<void> {
|
||||
try {
|
||||
await window.api.ssh.disconnect({ targetId })
|
||||
useAppStore.getState().recordFeatureInteraction('ssh')
|
||||
} catch (err) {
|
||||
toast.error(
|
||||
err instanceof Error
|
||||
? err.message
|
||||
: translate('auto.components.status.bar.SshStatusSegment.bf07aee59e', 'Disconnect failed')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export function SshTargetStatusRow({
|
||||
targetId,
|
||||
label,
|
||||
status
|
||||
kind,
|
||||
status,
|
||||
error,
|
||||
pending,
|
||||
recovery,
|
||||
now,
|
||||
onConnect,
|
||||
onDisconnect
|
||||
}: {
|
||||
targetId: string
|
||||
label: string
|
||||
kind?: string
|
||||
status: SshConnectionStatus
|
||||
error?: string | null
|
||||
pending: boolean
|
||||
recovery?: HostRecoveryObservation
|
||||
now: number
|
||||
onConnect: () => Promise<void>
|
||||
onDisconnect: () => Promise<void>
|
||||
}): React.JSX.Element {
|
||||
const t = useTranslate()
|
||||
const [busy, setBusy] = useState(false)
|
||||
const mountedRef = useMountedRef()
|
||||
const recordFeatureInteraction = useAppStore((s) => s.recordFeatureInteraction)
|
||||
// Share pending connects across surfaces until main broadcasts connecting, so duplicate attempts stay disabled.
|
||||
pending = pending && status !== 'connected'
|
||||
const connectInFlight = useSshConnectInFlight(targetId)
|
||||
|
||||
const handleConnect = useCallback(async () => {
|
||||
setBusy(true)
|
||||
try {
|
||||
await connectSshTargetFromStatusMenu(targetId)
|
||||
} finally {
|
||||
if (mountedRef.current) {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
}, [mountedRef, targetId])
|
||||
|
||||
const handleDisconnect = useCallback(async () => {
|
||||
setBusy(true)
|
||||
try {
|
||||
await window.api.ssh.disconnect({ targetId })
|
||||
recordFeatureInteraction('ssh')
|
||||
} catch (err) {
|
||||
toast.error(
|
||||
err instanceof Error
|
||||
? err.message
|
||||
: translate('auto.components.status.bar.SshStatusSegment.bf07aee59e', 'Disconnect failed')
|
||||
)
|
||||
} finally {
|
||||
if (mountedRef.current) {
|
||||
setBusy(false)
|
||||
}
|
||||
}
|
||||
}, [mountedRef, recordFeatureInteraction, targetId])
|
||||
|
||||
const transient =
|
||||
pending || status === 'connecting' || status === 'deploying-relay' || status === 'reconnecting'
|
||||
const failed = !transient && status !== 'connected' && status !== 'disconnected'
|
||||
const tone = transient
|
||||
? 'busy'
|
||||
: failed
|
||||
? 'error'
|
||||
: status === 'connected'
|
||||
? 'connected'
|
||||
: 'offline'
|
||||
const stateWord =
|
||||
transient && recovery?.attempt
|
||||
? t(
|
||||
'auto.components.status.bar.RemoteHostStatusRow.reconnecting_attempt',
|
||||
'Reconnecting (attempt {{attempt}})',
|
||||
{ attempt: String(recovery.attempt) }
|
||||
)
|
||||
: transient
|
||||
? t('auto.components.status.bar.SshStatusSegment.runtime_checking', 'Checking')
|
||||
: STATUS_LABELS[status]
|
||||
const actionKind = transient || status === 'connected' ? 'disconnect' : 'connect'
|
||||
return (
|
||||
<div className="flex items-center gap-2.5 px-2 py-1.5">
|
||||
<span className={`size-1.5 shrink-0 rounded-full ${statusColor(status)}`} />
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="truncate text-[12px] font-medium">{label}</div>
|
||||
<div className="flex min-w-0 items-center gap-1.5 text-[10px] text-muted-foreground">
|
||||
<span>{t('auto.components.status.bar.SshTargetStatusRow.sshHost', 'SSH Host')}</span>
|
||||
<span aria-hidden="true">·</span>
|
||||
<span>{STATUS_LABELS[status]}</span>
|
||||
</div>
|
||||
</div>
|
||||
{busy || connectInFlight ? (
|
||||
<Loader2 className="size-3 shrink-0 animate-spin text-muted-foreground" />
|
||||
) : canConnectSshStatus(status) ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => void handleConnect()}
|
||||
className="shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium text-foreground hover:bg-accent/70"
|
||||
>
|
||||
{sshConnectVerb(status, t)}
|
||||
</button>
|
||||
) : status === 'connected' ? (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => void handleDisconnect()}
|
||||
className="shrink-0 rounded px-1.5 py-0.5 text-[10px] text-muted-foreground hover:bg-accent/70 hover:text-foreground"
|
||||
>
|
||||
{t('auto.components.status.bar.SshStatusSegment.59b553e2aa', 'Disconnect')}
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
<RemoteHostStatusRow
|
||||
label={label}
|
||||
kind={kind}
|
||||
tone={tone}
|
||||
status={stateWord}
|
||||
actionKind={actionKind}
|
||||
actionLabel={
|
||||
transient
|
||||
? t('auto.components.status.bar.RemoteHostStatusRow.stop', 'Stop')
|
||||
: status === 'connected'
|
||||
? t('auto.components.status.bar.SshStatusSegment.59b553e2aa', 'Disconnect')
|
||||
: sshConnectVerb(status, t)
|
||||
}
|
||||
onAction={actionKind === 'disconnect' ? onDisconnect : onConnect}
|
||||
disabled={actionKind === 'connect' && connectInFlight}
|
||||
errorSentence={
|
||||
failed
|
||||
? status === 'auth-failed'
|
||||
? t(
|
||||
'auto.components.status.bar.RemoteHostStatusRow.ssh_sign_in_failed',
|
||||
'Couldn’t sign in to this host; check its SSH credentials.'
|
||||
)
|
||||
: t(
|
||||
'auto.components.status.bar.RemoteHostStatusRow.ssh_connect_failed',
|
||||
'Couldn’t connect to this host; check its SSH settings and try again.'
|
||||
)
|
||||
: undefined
|
||||
}
|
||||
rawDetail={error ?? undefined}
|
||||
recovery={recovery}
|
||||
now={now}
|
||||
onRetry={onConnect}
|
||||
onDisconnect={onDisconnect}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import type { Translate } from '@/i18n/use-translate'
|
||||
import type { SshConnectionStatus } from '../../../../shared/ssh-types'
|
||||
import type { RemoteRuntimeSharedConnectionDiagnostics } from '../../../../shared/remote-runtime/control/remote-runtime-shared-control-types'
|
||||
import type { RuntimeHostBlockedReason } from '../../../../shared/remote-runtime/host-status/runtime-host-status'
|
||||
import type { RuntimePairingRepairRoute } from '../../../../shared/remote-runtime/host-catalog/runtime-environments'
|
||||
import type { RuntimeCompatVerdict } from '../../../../shared/protocol-compat'
|
||||
@@ -34,8 +33,7 @@ export function runtimeHostStatusForOverall(
|
||||
export type RuntimeHostBlockedCopy = {
|
||||
label: string
|
||||
summary: string
|
||||
explanation: string
|
||||
/** Untranslated protocol detail, shown in the diagnostics box. */
|
||||
/** Untranslated protocol detail, copied only on request. */
|
||||
detail?: string
|
||||
}
|
||||
|
||||
@@ -63,12 +61,7 @@ export function runtimeHostBlockedCopy(
|
||||
if (reason === 'access-revoked') {
|
||||
return {
|
||||
label: t('auto.components.status.bar.RuntimeHostStatusRow.access_revoked', 'Access revoked'),
|
||||
summary: t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.access_revoked_summary',
|
||||
'This server revoked access for this computer'
|
||||
),
|
||||
// Why: Orca pairs a managed server over SSH by itself; it reaches here only when that failed.
|
||||
explanation:
|
||||
summary:
|
||||
repairRoute === 'access-link'
|
||||
? t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.access_revoked_explanation',
|
||||
@@ -77,7 +70,7 @@ export function runtimeHostBlockedCopy(
|
||||
: repairRoute === 'ssh'
|
||||
? t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.managed_access_revoked_explanation',
|
||||
"Orca couldn't pair with it again over SSH. Connect to try again."
|
||||
"Orca couldn't pair with it again over SSH; connect to try again."
|
||||
)
|
||||
: t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.connect_access_revoked_explanation',
|
||||
@@ -92,23 +85,14 @@ export function runtimeHostBlockedCopy(
|
||||
'Different server'
|
||||
),
|
||||
summary: t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.server_replaced_summary',
|
||||
'This host now runs a different Orca server than the one this computer paired with'
|
||||
),
|
||||
// Why: SSH access alone can't re-pin another server key, so reconnecting can't fix this.
|
||||
explanation: t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.server_replaced_explanation',
|
||||
'Orca connects to the host as a different SSH user, or its server was reinstalled. In Settings › Remote Orca Servers, open the ⋯ menu on this server and choose Forget…, then connect the SSH host to pair with its current server.'
|
||||
'In Settings › Remote Orca Servers, choose Forget… for this server, then connect the SSH host to pair with its current server.'
|
||||
)
|
||||
}
|
||||
}
|
||||
return {
|
||||
label: t('auto.components.status.bar.RuntimeHostStatusRow.update_required', 'Update required'),
|
||||
summary: t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.update_required_summary',
|
||||
'Orca versions are not compatible'
|
||||
),
|
||||
explanation: t(
|
||||
'auto.components.status.bar.RuntimeHostStatusRow.update_required_explanation',
|
||||
'Update Orca on this computer or on the server, then connect again.'
|
||||
),
|
||||
@@ -118,36 +102,10 @@ export function runtimeHostBlockedCopy(
|
||||
}
|
||||
}
|
||||
|
||||
export function runtimeHostConnectionDetail(
|
||||
remoteControl?: RemoteRuntimeSharedConnectionDiagnostics | null,
|
||||
t: Translate = translate
|
||||
): string | undefined {
|
||||
if (!remoteControl) {
|
||||
return undefined
|
||||
}
|
||||
if (
|
||||
remoteControl.state === 'awaiting_ready' ||
|
||||
remoteControl.state === 'awaiting_authenticated'
|
||||
) {
|
||||
return undefined
|
||||
}
|
||||
if (remoteControl.state === 'reconnecting') {
|
||||
return t(
|
||||
'auto.components.status.bar.SshStatusSegment.runtime_reconnect_attempt',
|
||||
'Attempt {{value0}}',
|
||||
{ value0: String(remoteControl.reconnectAttempt + 1) }
|
||||
)
|
||||
}
|
||||
if (remoteControl.lastError) {
|
||||
return remoteControl.lastError
|
||||
}
|
||||
if (remoteControl.lastClose?.reason) {
|
||||
return t(
|
||||
'auto.components.status.bar.SshStatusSegment.runtime_last_close_reason',
|
||||
'Closed: {{value0}}',
|
||||
{ value0: remoteControl.lastClose.reason }
|
||||
)
|
||||
}
|
||||
// Hide internal RPC counts; only errors, close reasons and reconnect attempts help users act.
|
||||
return undefined
|
||||
export function ambiguousRemoteHostNames(
|
||||
servers: readonly { label: string }[],
|
||||
sshHosts: readonly { label: string }[]
|
||||
): ReadonlySet<string> {
|
||||
const serverNames = new Set(servers.map((host) => host.label))
|
||||
return new Set(sshHosts.filter((host) => serverNames.has(host.label)).map((host) => host.label))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
import type { AppState } from '../../store/types'
|
||||
import type { Translate } from '@/i18n/use-translate'
|
||||
import { getHostDisplayLabelOverrides } from '../../../../shared/host-setting-overrides'
|
||||
import {
|
||||
isOwnedSshTargetId,
|
||||
toRuntimeExecutionHostId,
|
||||
toSshExecutionHostId
|
||||
} from '../../../../shared/execution-host'
|
||||
import { buildExecutionHostRegistry } from '../../../../shared/execution-host/execution-host-registry'
|
||||
import { pickerExecutionHosts } from '../../../../shared/execution-host/managed-orcad-execution-host'
|
||||
import {
|
||||
isListedRemoteServer,
|
||||
runtimePairingRepairRoute
|
||||
} from '../../../../shared/remote-runtime/host-catalog/runtime-environments'
|
||||
import { isConnectedRuntimeHostState } from '../../../../shared/remote-runtime/host-status/runtime-host-connection-state'
|
||||
import { runtimeHostConnectionStateForEntry } from '@/runtime/hosts/connections/runtime-host-connection-state'
|
||||
import {
|
||||
runtimeHostBlockedCopy,
|
||||
runtimeHostBlockedRecovery,
|
||||
runtimeHostStatusForOverall,
|
||||
sshStatusForOverall
|
||||
} from './remote-host-connection-status'
|
||||
import type { SshConnectionStatus } from '../../../../shared/ssh-types'
|
||||
|
||||
export function buildRemoteHostMenuInventory(
|
||||
{
|
||||
runtimeEnvironments,
|
||||
settings,
|
||||
sshTargetLabels,
|
||||
sshConnectionStates,
|
||||
runtimeStatusByEnvironmentId
|
||||
}: Pick<
|
||||
AppState,
|
||||
| 'runtimeEnvironments'
|
||||
| 'settings'
|
||||
| 'sshTargetLabels'
|
||||
| 'sshConnectionStates'
|
||||
| 'runtimeStatusByEnvironmentId'
|
||||
>,
|
||||
t: Translate
|
||||
) {
|
||||
const hostLabelOverrides = getHostDisplayLabelOverrides(settings)
|
||||
const userManagedEnvironments = runtimeEnvironments.filter(isListedRemoteServer)
|
||||
// Why the registry: a managed server and its SSH host are one machine, shown on its active route.
|
||||
const visibleHosts = new Map(
|
||||
pickerExecutionHosts(
|
||||
buildExecutionHostRegistry({
|
||||
repos: [],
|
||||
settings,
|
||||
hostSource: 'configured-only',
|
||||
sshTargetLabels,
|
||||
sshConnectionStates,
|
||||
runtimeEnvironments: userManagedEnvironments,
|
||||
runtimeStatusByEnvironmentId,
|
||||
hostLabelOverrides
|
||||
})
|
||||
).map((host) => [host.id, host])
|
||||
)
|
||||
const targets = Array.from(sshTargetLabels.entries())
|
||||
// Hide runtime-owned per-workspace SSH targets from the user-managed host list.
|
||||
.filter(([id]) => !isOwnedSshTargetId(id) && visibleHosts.has(toSshExecutionHostId(id)))
|
||||
.map(([id, label]) => {
|
||||
const state = sshConnectionStates.get(id)
|
||||
return {
|
||||
id,
|
||||
label: visibleHosts.get(toSshExecutionHostId(id))?.label || label,
|
||||
error: state?.error,
|
||||
reconnectAttempt: state?.reconnectAttempt,
|
||||
status: state?.status ?? ('disconnected' satisfies SshConnectionStatus)
|
||||
}
|
||||
})
|
||||
const runtimeHosts = userManagedEnvironments
|
||||
.filter((environment) => visibleHosts.has(toRuntimeExecutionHostId(environment.id)))
|
||||
.map((environment) => {
|
||||
const statusEntry = runtimeStatusByEnvironmentId.get(environment.id)
|
||||
const registryHost = visibleHosts.get(toRuntimeExecutionHostId(environment.id))
|
||||
// Why the registry's verdict: it is the same blocked reason the sidebar and Settings show.
|
||||
const blockedReason =
|
||||
registryHost?.health === 'blocked' ? registryHost.blockedReason : undefined
|
||||
const repairRoute = runtimePairingRepairRoute(environment)
|
||||
return {
|
||||
id: environment.id,
|
||||
label: registryHost?.label || environment.name || environment.id,
|
||||
blockedReason,
|
||||
blocked: blockedReason
|
||||
? {
|
||||
...runtimeHostBlockedCopy(blockedReason, registryHost?.compatibility, repairRoute, t),
|
||||
recovery: runtimeHostBlockedRecovery(blockedReason, repairRoute)
|
||||
}
|
||||
: null,
|
||||
snapshot: statusEntry?.snapshot,
|
||||
status: statusEntry?.status ?? null,
|
||||
active: settings?.activeRuntimeEnvironmentId === environment.id,
|
||||
remoteControl: statusEntry?.remoteControl ?? statusEntry?.status?.remoteControl ?? null
|
||||
}
|
||||
})
|
||||
const runtimeHostRows = runtimeHosts.map((host) => ({
|
||||
...host,
|
||||
state: runtimeHostConnectionStateForEntry(runtimeStatusByEnvironmentId.get(host.id))
|
||||
}))
|
||||
// Host health is independent of active runtime selection; available remote servers remain online.
|
||||
const connectedRuntimeHosts = runtimeHostRows.filter((host) =>
|
||||
isConnectedRuntimeHostState(host.state)
|
||||
)
|
||||
const inactiveRuntimeHosts = runtimeHostRows.filter(
|
||||
(host) => !isConnectedRuntimeHostState(host.state)
|
||||
)
|
||||
const statuses = [
|
||||
...targets.map((target) => sshStatusForOverall(target.status)),
|
||||
...runtimeHostRows.map((host) => runtimeHostStatusForOverall(host.state, host.blockedReason))
|
||||
]
|
||||
return {
|
||||
targets,
|
||||
runtimeHostRows,
|
||||
connectedRuntimeHosts,
|
||||
inactiveRuntimeHosts,
|
||||
connectedHostCount: statuses.filter((status) => status === 'connected').length,
|
||||
hostCount: statuses.length
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,249 @@
|
||||
// @vitest-environment happy-dom
|
||||
import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'
|
||||
import { afterEach, expect, it, vi } from 'vitest'
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuTrigger
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { TooltipProvider } from '@/components/ui/tooltip'
|
||||
import { RemoteHostStatusRow } from './RemoteHostStatusRow'
|
||||
import { RuntimeHostStatusRow } from './RuntimeHostStatusRow'
|
||||
import { SshTargetStatusRow, connectSshTargetFromStatusMenu } from './SshTargetStatusRow'
|
||||
import { useRemoteHostMenuState } from './use-remote-host-menu-state'
|
||||
import { toastSshConnectFailure } from '@/ssh/ssh-connect-failure-toast'
|
||||
import { resetSshConnectInFlightForTests } from '@/ssh/ssh-connect-in-flight'
|
||||
|
||||
vi.mock('../../store', () => ({
|
||||
useAppStore: { getState: () => ({ recordFeatureInteraction: vi.fn() }) }
|
||||
}))
|
||||
vi.mock('@/ssh/ssh-connect-failure-toast', () => ({ toastSshConnectFailure: vi.fn() }))
|
||||
const hostExists = () => true
|
||||
const id = 'ssh:host'
|
||||
|
||||
function Hosts({
|
||||
open = true,
|
||||
attempt = 1,
|
||||
recovering = true
|
||||
}: {
|
||||
open?: boolean
|
||||
attempt?: number
|
||||
recovering?: boolean
|
||||
}) {
|
||||
const menu = useRemoteHostMenuState(open, hostExists)
|
||||
menu.observe([{ id, recovering, attempt }])
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<DropdownMenu open={open} modal={false}>
|
||||
<DropdownMenuTrigger>Hosts</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
<RemoteHostStatusRow
|
||||
label="Host"
|
||||
tone={recovering ? 'busy' : 'connected'}
|
||||
status="Connection state"
|
||||
actionLabel="Stop"
|
||||
actionKind="disconnect"
|
||||
onAction={vi.fn()}
|
||||
recovery={menu.observations.get(id)}
|
||||
now={menu.now}
|
||||
/>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</TooltipProvider>
|
||||
)
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
cleanup()
|
||||
vi.useRealTimers()
|
||||
vi.clearAllMocks()
|
||||
resetSshConnectInFlightForTests()
|
||||
})
|
||||
|
||||
it('keeps recovery age across handshake and menu reopening, with either threshold and a success reset', async () => {
|
||||
vi.useFakeTimers()
|
||||
vi.setSystemTime(10_000)
|
||||
const view = render(<Hosts />)
|
||||
const row = () => screen.getByRole('menuitem', { name: 'Host, Connection state' })
|
||||
expect(row().getAttribute('aria-haspopup')).toBeNull()
|
||||
await act(() => vi.advanceTimersByTimeAsync(29_000))
|
||||
view.rerender(<Hosts attempt={0} />)
|
||||
expect(row().getAttribute('aria-haspopup')).toBeNull()
|
||||
view.rerender(<Hosts open={false} attempt={0} />)
|
||||
await act(() => vi.advanceTimersByTimeAsync(2_000))
|
||||
view.rerender(<Hosts attempt={0} />)
|
||||
expect(row().getAttribute('aria-haspopup')).toBe('menu')
|
||||
view.rerender(<Hosts recovering={false} attempt={0} />)
|
||||
view.rerender(<Hosts attempt={2} />)
|
||||
expect(row().getAttribute('aria-haspopup')).toBeNull()
|
||||
view.rerender(<Hosts attempt={3} />)
|
||||
expect(row().getAttribute('aria-haspopup')).toBe('menu')
|
||||
view.rerender(<Hosts attempt={0} />)
|
||||
expect(row().getAttribute('aria-haspopup')).toBe('menu')
|
||||
})
|
||||
|
||||
it('keeps the primary action independently keyboard reachable beside an open error submenu', async () => {
|
||||
const retry = vi.fn()
|
||||
const copy = vi.fn(async () => undefined)
|
||||
Object.defineProperty(window, 'api', {
|
||||
configurable: true,
|
||||
value: { ui: { writeClipboardText: copy } }
|
||||
})
|
||||
render(
|
||||
<TooltipProvider>
|
||||
<DropdownMenu defaultOpen modal={false}>
|
||||
<DropdownMenuTrigger>Hosts</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
<RemoteHostStatusRow
|
||||
label="Host"
|
||||
tone="error"
|
||||
status="Error"
|
||||
actionLabel="Retry"
|
||||
actionKind="connect"
|
||||
onAction={retry}
|
||||
errorSentence="Connection unavailable."
|
||||
rawDetail="fixture raw error"
|
||||
now={0}
|
||||
/>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</TooltipProvider>
|
||||
)
|
||||
const row = screen.getByRole('menuitem', { name: 'Host, Error' })
|
||||
row.focus()
|
||||
fireEvent.keyDown(row, { key: 'ArrowDown' })
|
||||
const action = screen.getByRole('menuitem', { name: 'Retry Host' })
|
||||
await vi.waitFor(() => expect(document.activeElement).toBe(action))
|
||||
await act(async () => fireEvent.keyDown(action, { key: 'Enter' }))
|
||||
expect(retry).toHaveBeenCalledTimes(1)
|
||||
row.focus()
|
||||
fireEvent.keyDown(row, { key: 'ArrowRight' })
|
||||
const copyAction = await screen.findByRole('menuitem', { name: 'Copy error' })
|
||||
fireEvent.keyDown(copyAction, { key: 'Enter' })
|
||||
expect(copy).toHaveBeenCalledWith('fixture raw error')
|
||||
await act(async () => fireEvent.click(action))
|
||||
expect(retry).toHaveBeenCalledTimes(2)
|
||||
})
|
||||
|
||||
function PendingSshHost() {
|
||||
const menu = useRemoteHostMenuState(true, hostExists)
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<DropdownMenu defaultOpen modal={false}>
|
||||
<DropdownMenuTrigger>Hosts</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
<SshTargetStatusRow
|
||||
targetId="host"
|
||||
label="Host"
|
||||
status="disconnected"
|
||||
now={0}
|
||||
pending={menu.pending.has(id)}
|
||||
onConnect={() =>
|
||||
menu.connect(id, (signal) => connectSshTargetFromStatusMenu('host', signal))
|
||||
}
|
||||
onDisconnect={async () => {
|
||||
menu.cancel(id)
|
||||
await window.api.ssh.disconnect({ targetId: 'host' })
|
||||
}}
|
||||
/>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</TooltipProvider>
|
||||
)
|
||||
}
|
||||
|
||||
it('keeps Stop usable before the connect status arrives and suppresses its late failure', async () => {
|
||||
let rejectConnect: (error: Error) => void = () => undefined
|
||||
const request = new Promise<never>((_, reject) => {
|
||||
rejectConnect = reject
|
||||
})
|
||||
const disconnect = vi.fn(async () => undefined)
|
||||
Object.defineProperty(window, 'api', {
|
||||
configurable: true,
|
||||
value: {
|
||||
ssh: {
|
||||
connect: vi.fn(() => request),
|
||||
disconnect
|
||||
}
|
||||
}
|
||||
})
|
||||
render(<PendingSshHost />)
|
||||
await act(async () => fireEvent.click(screen.getByRole('menuitem', { name: 'Connect Host' })))
|
||||
await act(async () => fireEvent.click(screen.getByRole('menuitem', { name: 'Stop Host' })))
|
||||
expect(disconnect).toHaveBeenCalledWith({ targetId: 'host' })
|
||||
await act(async () => rejectConnect(new Error('cancelled fixture attempt')))
|
||||
expect(toastSshConnectFailure).not.toHaveBeenCalled()
|
||||
expect(screen.getByRole('menuitem', { name: 'Connect Host' })).toBeTruthy()
|
||||
})
|
||||
|
||||
it('shows connected hosts as connected while their explicit connect is still settling', () => {
|
||||
render(
|
||||
<TooltipProvider>
|
||||
<DropdownMenu defaultOpen modal={false}>
|
||||
<DropdownMenuTrigger>Hosts</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
<RuntimeHostStatusRow
|
||||
label="Server"
|
||||
state="connected"
|
||||
pending
|
||||
recovery={{ since: 1, attempt: 7 }}
|
||||
now={60_000}
|
||||
onConnect={vi.fn()}
|
||||
onDisconnect={vi.fn()}
|
||||
onRecover={vi.fn()}
|
||||
/>
|
||||
<SshTargetStatusRow
|
||||
targetId="host"
|
||||
label="SSH"
|
||||
status="connected"
|
||||
pending
|
||||
recovery={{ since: 1, attempt: 7 }}
|
||||
now={60_000}
|
||||
onConnect={vi.fn()}
|
||||
onDisconnect={vi.fn()}
|
||||
/>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</TooltipProvider>
|
||||
)
|
||||
expect(screen.getByRole('menuitem', { name: 'Disconnect Server' })).toBeTruthy()
|
||||
expect(screen.getByRole('menuitem', { name: 'Disconnect SSH' })).toBeTruthy()
|
||||
expect(
|
||||
screen.getByRole('menuitem', { name: 'Server, Connected' }).hasAttribute('aria-haspopup')
|
||||
).toBe(false)
|
||||
expect(
|
||||
screen.getByRole('menuitem', { name: 'SSH, Connected' }).hasAttribute('aria-haspopup')
|
||||
).toBe(false)
|
||||
expect(screen.queryByRole('menuitem', { name: /Stop/ })).toBeNull()
|
||||
})
|
||||
|
||||
it('clears the old unavailable card while Retry is connecting, then shows only eligible recovery', () => {
|
||||
const row = (attempt: number) => (
|
||||
<TooltipProvider>
|
||||
<DropdownMenu defaultOpen modal={false}>
|
||||
<DropdownMenuTrigger>Hosts</DropdownMenuTrigger>
|
||||
<DropdownMenuContent>
|
||||
<RuntimeHostStatusRow
|
||||
label="Server"
|
||||
state="runtime-unavailable"
|
||||
pending
|
||||
recovery={{ since: 10_000, attempt }}
|
||||
now={10_001}
|
||||
onConnect={vi.fn()}
|
||||
onDisconnect={vi.fn()}
|
||||
onRecover={vi.fn()}
|
||||
/>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</TooltipProvider>
|
||||
)
|
||||
const view = render(row(0))
|
||||
expect(screen.getByRole('menuitem', { name: 'Stop Server' })).toBeTruthy()
|
||||
const trigger = screen.getByRole('menuitem', { name: 'Server, Checking' })
|
||||
expect(trigger.hasAttribute('aria-haspopup')).toBe(false)
|
||||
view.rerender(row(3))
|
||||
const reconnecting = screen.getByRole('menuitem', { name: 'Server, Reconnecting (attempt 3)' })
|
||||
fireEvent.keyDown(reconnecting, { key: 'ArrowRight' })
|
||||
expect(screen.getByRole('menuitem', { name: 'Retry now' })).toBeTruthy()
|
||||
expect(screen.queryByRole('menuitem', { name: 'Copy error' })).toBeNull()
|
||||
})
|
||||
@@ -0,0 +1,57 @@
|
||||
import { expect, it, vi } from 'vitest'
|
||||
import {
|
||||
connectRuntimeEnvironmentAndRecordStatus,
|
||||
connectRuntimeHostForNavigation
|
||||
} from './runtime-environment-explicit-connect'
|
||||
const { setStatus } = vi.hoisted(() => ({ setStatus: vi.fn() }))
|
||||
vi.mock('../../store', () => ({
|
||||
useAppStore: { getState: () => ({ setRuntimeEnvironmentStatus: setStatus }) }
|
||||
}))
|
||||
|
||||
it('does not publish an obsolete status when Stop cancelled the pending connect', async () => {
|
||||
let resolveConnect: (value: unknown) => void = () => undefined
|
||||
const request = new Promise((resolve) => {
|
||||
resolveConnect = resolve
|
||||
})
|
||||
vi.stubGlobal('window', { api: { runtimeEnvironments: { connect: vi.fn(() => request) } } })
|
||||
const controller = new AbortController()
|
||||
const result = connectRuntimeEnvironmentAndRecordStatus('host', 5000, controller.signal)
|
||||
controller.abort()
|
||||
resolveConnect({
|
||||
id: 'status.get',
|
||||
ok: false,
|
||||
error: { code: 'runtime_manually_disconnected', message: 'Disconnected' }
|
||||
})
|
||||
expect(await result).toBe(false)
|
||||
expect(setStatus).not.toHaveBeenCalled()
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
|
||||
it('stops subsequent catalog dispatch after Stop during a multi-batch project refresh', async () => {
|
||||
const controller = new AbortController()
|
||||
const resolvers: (() => void)[] = []
|
||||
const reached: string[] = []
|
||||
const fetchWorktrees = (repoId: string) => {
|
||||
reached.push(repoId)
|
||||
return new Promise<void>((resolve) => {
|
||||
resolvers.push(resolve)
|
||||
})
|
||||
}
|
||||
const fetchLineage = vi.fn(async () => undefined)
|
||||
const result = connectRuntimeHostForNavigation({
|
||||
environmentId: 'host',
|
||||
signal: controller.signal,
|
||||
refreshStatus: async () => true,
|
||||
fetchRepos: async () => Array.from({ length: 16 }, (_, index) => ({ id: String(index) })),
|
||||
fetchWorktrees,
|
||||
fetchLineage
|
||||
})
|
||||
await vi.waitFor(() => expect(reached).toContain('14'))
|
||||
controller.abort()
|
||||
for (const resolve of resolvers) {
|
||||
resolve()
|
||||
}
|
||||
expect(await result).toBe(false)
|
||||
expect(reached).not.toContain('15')
|
||||
expect(fetchLineage).not.toHaveBeenCalled()
|
||||
})
|
||||
@@ -8,7 +8,8 @@ import { useAppStore } from '../../store'
|
||||
|
||||
export async function connectRuntimeEnvironmentAndRecordStatus(
|
||||
environmentId: string,
|
||||
timeoutMs: number
|
||||
timeoutMs: number,
|
||||
signal?: AbortSignal
|
||||
): Promise<boolean> {
|
||||
const setStatus = useAppStore.getState().setRuntimeEnvironmentStatus
|
||||
try {
|
||||
@@ -16,10 +17,16 @@ export async function connectRuntimeEnvironmentAndRecordStatus(
|
||||
selector: environmentId,
|
||||
timeoutMs
|
||||
})
|
||||
if (signal?.aborted) {
|
||||
return false
|
||||
}
|
||||
const status = unwrapRuntimeRpcResult<RuntimeStatus>(response)
|
||||
setStatus(environmentId, { status, checkedAt: Date.now() })
|
||||
return true
|
||||
} catch {
|
||||
if (signal?.aborted) {
|
||||
return false
|
||||
}
|
||||
setStatus(environmentId, { status: null, checkedAt: Date.now() })
|
||||
return false
|
||||
}
|
||||
@@ -27,6 +34,7 @@ export async function connectRuntimeEnvironmentAndRecordStatus(
|
||||
|
||||
export async function connectRuntimeHostForNavigation(args: {
|
||||
environmentId: string
|
||||
signal?: AbortSignal
|
||||
refreshStatus: (environmentId: string, timeoutMs: number) => Promise<boolean>
|
||||
fetchRepos: (environmentId: string) => Promise<{ id: string }[]>
|
||||
fetchWorktrees: (
|
||||
@@ -35,17 +43,37 @@ export async function connectRuntimeHostForNavigation(args: {
|
||||
) => Promise<unknown>
|
||||
fetchLineage: (options: { executionHostId: ExecutionHostId }) => Promise<unknown>
|
||||
}): Promise<boolean> {
|
||||
if (!(await args.refreshStatus(args.environmentId, 5_000))) {
|
||||
return false
|
||||
try {
|
||||
if (!(await args.refreshStatus(args.environmentId, 5_000)) || args.signal?.aborted) {
|
||||
return false
|
||||
}
|
||||
const repos = await args.fetchRepos(args.environmentId)
|
||||
if (args.signal?.aborted) {
|
||||
return false
|
||||
}
|
||||
await refreshRuntimeProjectWorktreesAndLineage(
|
||||
args.environmentId,
|
||||
repos,
|
||||
async (repoId, options) => {
|
||||
if (!args.signal?.aborted) {
|
||||
return args.fetchWorktrees(repoId, options)
|
||||
}
|
||||
return undefined
|
||||
},
|
||||
async (options) => {
|
||||
if (!args.signal?.aborted) {
|
||||
return args.fetchLineage(options)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
)
|
||||
return !args.signal?.aborted
|
||||
} catch (error) {
|
||||
if (args.signal?.aborted) {
|
||||
return false
|
||||
}
|
||||
throw error
|
||||
}
|
||||
const repos = await args.fetchRepos(args.environmentId)
|
||||
await refreshRuntimeProjectWorktreesAndLineage(
|
||||
args.environmentId,
|
||||
repos,
|
||||
args.fetchWorktrees,
|
||||
args.fetchLineage
|
||||
)
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,17 +82,20 @@ export async function connectRuntimeHostForNavigation(args: {
|
||||
*/
|
||||
export async function connectRuntimeHostAndReloadProjects(
|
||||
environmentId: string,
|
||||
failureMessage?: string
|
||||
failureMessage?: string,
|
||||
signal?: AbortSignal
|
||||
): Promise<boolean> {
|
||||
const store = useAppStore.getState()
|
||||
const reachable = await connectRuntimeHostForNavigation({
|
||||
environmentId,
|
||||
refreshStatus: connectRuntimeEnvironmentAndRecordStatus,
|
||||
signal,
|
||||
refreshStatus: (id, timeoutMs) =>
|
||||
connectRuntimeEnvironmentAndRecordStatus(id, timeoutMs, signal),
|
||||
fetchRepos: store.fetchRuntimeEnvironmentRepos,
|
||||
fetchWorktrees: store.fetchWorktrees,
|
||||
fetchLineage: store.fetchWorktreeLineage
|
||||
})
|
||||
if (!reachable) {
|
||||
if (!reachable && !signal?.aborted) {
|
||||
toast.error(
|
||||
failureMessage ??
|
||||
translate(
|
||||
|
||||
@@ -6,25 +6,33 @@ export const SSH_STATUS_MENU_IDLE_ROW_LIMIT = 25
|
||||
|
||||
export type SshStatusMenuTarget = { id: string; label: string; status: SshConnectionStatus }
|
||||
|
||||
export type SshStatusMenuRows = {
|
||||
connected: SshStatusMenuTarget[]
|
||||
inactive: SshStatusMenuTarget[]
|
||||
export type SshStatusMenuRows<Target extends SshStatusMenuTarget = SshStatusMenuTarget> = {
|
||||
connected: Target[]
|
||||
inactive: Target[]
|
||||
hiddenIdleCount: number
|
||||
}
|
||||
|
||||
/** Always show busy/connected hosts; above the idle limit, prioritize hosts with projects over config order. */
|
||||
export function splitSshStatusMenuRows(
|
||||
targets: readonly SshStatusMenuTarget[],
|
||||
options: { projectHostIds?: ReadonlySet<string>; idleRowLimit?: number } = {}
|
||||
): SshStatusMenuRows {
|
||||
export function splitSshStatusMenuRows<Target extends SshStatusMenuTarget>(
|
||||
targets: readonly Target[],
|
||||
options: {
|
||||
projectHostIds?: ReadonlySet<string>
|
||||
pendingTargetIds?: ReadonlySet<string>
|
||||
idleRowLimit?: number
|
||||
} = {}
|
||||
): SshStatusMenuRows<Target> {
|
||||
const { projectHostIds, idleRowLimit = SSH_STATUS_MENU_IDLE_ROW_LIMIT } = options
|
||||
const connected = targets.filter((target) => target.status === 'connected')
|
||||
const inactive = targets.filter((target) => target.status !== 'connected')
|
||||
const idle = inactive.filter((target) => target.status === 'disconnected')
|
||||
const idle = inactive.filter(
|
||||
(target) => target.status === 'disconnected' && !options.pendingTargetIds?.has(target.id)
|
||||
)
|
||||
if (idle.length <= idleRowLimit) {
|
||||
return { connected, inactive, hiddenIdleCount: 0 }
|
||||
}
|
||||
const busy = inactive.filter((target) => target.status !== 'disconnected')
|
||||
const busy = inactive.filter(
|
||||
(target) => target.status !== 'disconnected' || options.pendingTargetIds?.has(target.id)
|
||||
)
|
||||
const shownIdle = [
|
||||
...idle.filter((target) => projectHostIds?.has(target.id)),
|
||||
...idle.filter((target) => !projectHostIds?.has(target.id))
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
import { useCallback, useEffect, useRef, useState } from 'react'
|
||||
import { useMountedRef } from '@/hooks/useMountedRef'
|
||||
|
||||
export type HostRecoveryObservation = { since: number; attempt: number }
|
||||
export type HostMenuConnection = { id: string; recovering: boolean; attempt: number }
|
||||
|
||||
export function reconcileHostRecovery(
|
||||
previous: ReadonlyMap<string, HostRecoveryObservation>,
|
||||
hosts: HostMenuConnection[],
|
||||
now: number
|
||||
): ReadonlyMap<string, HostRecoveryObservation> {
|
||||
const next = new Map<string, HostRecoveryObservation>()
|
||||
for (const host of hosts) {
|
||||
if (!host.recovering) {
|
||||
continue
|
||||
}
|
||||
const old = previous.get(host.id)
|
||||
next.set(
|
||||
host.id,
|
||||
old && old.attempt >= host.attempt
|
||||
? old
|
||||
: {
|
||||
since: old?.since ?? now,
|
||||
attempt: Math.max(old?.attempt ?? 0, host.attempt)
|
||||
}
|
||||
)
|
||||
}
|
||||
return next.size === previous.size && [...next].every(([id, value]) => previous.get(id) === value)
|
||||
? previous
|
||||
: next
|
||||
}
|
||||
|
||||
export function useRemoteHostMenuState(open: boolean, hostExists: (id: string) => boolean) {
|
||||
const mounted = useMountedRef()
|
||||
const controllers = useRef(new Map<string, AbortController>())
|
||||
const [pending, setPending] = useState<ReadonlySet<string>>(() => new Set())
|
||||
const [observations, setObservations] = useState<ReadonlyMap<string, HostRecoveryObservation>>(
|
||||
() => new Map()
|
||||
)
|
||||
const [now, setNow] = useState(0)
|
||||
const [deadlineTick, setDeadlineTick] = useState(0)
|
||||
const connect = useCallback(
|
||||
async (id: string, action: (signal: AbortSignal) => Promise<void>) => {
|
||||
if (controllers.current.has(id)) {
|
||||
return
|
||||
}
|
||||
const controller = new AbortController()
|
||||
controllers.current.set(id, controller)
|
||||
setPending(new Set(controllers.current.keys()))
|
||||
try {
|
||||
await action(controller.signal)
|
||||
} finally {
|
||||
if (controllers.current.get(id) === controller) {
|
||||
controllers.current.delete(id)
|
||||
if (mounted.current) {
|
||||
setPending(new Set(controllers.current.keys()))
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
[mounted]
|
||||
)
|
||||
const cancel = useCallback((id: string) => {
|
||||
controllers.current.get(id)?.abort()
|
||||
controllers.current.delete(id)
|
||||
setPending(new Set(controllers.current.keys()))
|
||||
}, [])
|
||||
useEffect(
|
||||
() => () => {
|
||||
for (const controller of controllers.current.values()) {
|
||||
controller.abort()
|
||||
}
|
||||
controllers.current.clear()
|
||||
},
|
||||
[]
|
||||
)
|
||||
useEffect(() => {
|
||||
if (!open) {
|
||||
return
|
||||
}
|
||||
const current = Date.now()
|
||||
setNow(current)
|
||||
let deadline = Infinity
|
||||
for (const observation of observations.values()) {
|
||||
if (observation.attempt < 3 && observation.since + 30_000 > current) {
|
||||
deadline = Math.min(deadline, observation.since + 30_000)
|
||||
}
|
||||
}
|
||||
if (!Number.isFinite(deadline)) {
|
||||
return
|
||||
}
|
||||
const timer = setTimeout(() => setDeadlineTick((tick) => tick + 1), deadline - current)
|
||||
return () => clearTimeout(timer)
|
||||
}, [open, observations, deadlineTick])
|
||||
useEffect(() => {
|
||||
let removed = false
|
||||
for (const [id, controller] of controllers.current) {
|
||||
if (!hostExists(id)) {
|
||||
controller.abort()
|
||||
controllers.current.delete(id)
|
||||
removed = true
|
||||
}
|
||||
}
|
||||
if (removed) {
|
||||
setPending(new Set(controllers.current.keys()))
|
||||
}
|
||||
}, [hostExists])
|
||||
const observe = (hosts: HostMenuConnection[]) => {
|
||||
// State equality makes this adjustment independent of array identity and dropdown lifetime.
|
||||
const next = reconcileHostRecovery(observations, hosts, 0)
|
||||
if (next !== observations) {
|
||||
setObservations((previous) => reconcileHostRecovery(previous, hosts, Date.now()))
|
||||
}
|
||||
}
|
||||
return { connect, cancel, pending, observations, now, observe }
|
||||
}
|
||||
@@ -4540,7 +4540,6 @@
|
||||
"63f36455cc": "Verbinden",
|
||||
"bf07aee59e": "Trennen fehlgeschlagen",
|
||||
"2c29e2de68": "Verbindung fehlgeschlagen",
|
||||
"remote_server": "Remote-Server",
|
||||
"runtime_checking": "Wird geprüft",
|
||||
"runtime_online": "Verbunden",
|
||||
"runtime_unavailable_transport_up": "Orca nicht verfügbar",
|
||||
@@ -4548,8 +4547,6 @@
|
||||
"runtime_connect_unavailable": "Remote-Host ist nicht erreichbar",
|
||||
"runtime_disconnect_failed": "Trennen fehlgeschlagen",
|
||||
"runtime_reconnecting": "Wird erneut verbunden",
|
||||
"runtime_last_close_reason": "Geschlossen: {{value0}}",
|
||||
"runtime_reconnect_attempt": "Versuch {{value0}}",
|
||||
"runtime_workspace_window_closed": "Arbeitsbereichsfenster geschlossen",
|
||||
"connectedHostCount_one": "{{count}} Host",
|
||||
"connectedHostCount_other": "{{count}} Hosts",
|
||||
@@ -4830,9 +4827,6 @@
|
||||
"rateLimitResetsAvailable_one": "{{count}} Ratenlimit-Zurücksetzung verfügbar",
|
||||
"rateLimitResetsAvailable_other": "{{count}} Ratenlimit-Zurücksetzungen verfügbar"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "SSH-Host"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "{{value0}}% verbraucht",
|
||||
"remaining": "{{value0}}% verbleibend",
|
||||
@@ -4907,29 +4901,17 @@
|
||||
"offDescription": "Normalen Systemruhezustand zulassen"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "Die vorherige Verbindung wurde geschlossen",
|
||||
"workspace_window_closed": "Das Arbeitsbereichsfenster ist geschlossen",
|
||||
"checking_host": "Orca prüft, ob dieser Host erreichbar ist",
|
||||
"restoring_connection": "Orca versucht, die Verbindung wiederherzustellen",
|
||||
"host_unreachable": "Orca ist auf diesem Host nicht erreichbar",
|
||||
"runtime_unavailable": "Die SSH-Verbindung besteht, aber die Orca-Laufzeitumgebung ist nicht verfügbar",
|
||||
"runtime_unavailable_explanation": "Der Remote-Host läuft möglicherweise noch; nur die Verbindung zur Orca-Laufzeitumgebung ist nicht verfügbar.",
|
||||
"contact_note": "Der Host läuft möglicherweise noch; nur die Orca-Verbindung ist nicht verfügbar.",
|
||||
"last_connected": "Zuletzt verbunden: {{value0}}",
|
||||
"reconnect_attempt": "Versuch {{value0}}",
|
||||
"access_revoked": "Zugriff widerrufen",
|
||||
"access_revoked_summary": "Dieser Server hat den Zugriff für diesen Computer widerrufen",
|
||||
"access_revoked_explanation": "Mit einem neuen Kopplungslink vom Server erneut koppeln, um die Verbindung wiederherzustellen.",
|
||||
"managed_access_revoked_explanation": "Orca konnte die Kopplung über SSH nicht wiederherstellen. Verbinden, um es erneut zu versuchen.",
|
||||
"connect_access_revoked_explanation": "Verbinden, um es erneut zu versuchen.",
|
||||
"update_required": "Update erforderlich",
|
||||
"update_required_summary": "Orca-Versionen sind nicht kompatibel",
|
||||
"update_required_explanation": "Orca auf diesem Computer oder auf dem Server aktualisieren und anschließend erneut verbinden.",
|
||||
"repair": "Erneut koppeln…",
|
||||
"open_settings": "Einstellungen öffnen…",
|
||||
"server_replaced": "Anderer Server",
|
||||
"server_replaced_summary": "Auf diesem Host läuft jetzt ein anderer Orca-Server als der, mit dem dieser Computer gekoppelt wurde",
|
||||
"server_replaced_explanation": "Orca verbindet sich als ein anderer SSH-Benutzer mit dem Host oder dessen Server wurde neu installiert. Öffne unter Einstellungen › Entfernte Orca-Server das Menü ⋯ dieses Servers und wähle „Vergessen…“. Verbinde dann den SSH-Host, um ihn mit seinem aktuellen Server zu koppeln."
|
||||
"access_revoked_explanation": "Mit einem neuen Kopplungslink vom Server erneut koppeln, um die Verbindung wiederherzustellen.",
|
||||
"managed_access_revoked_explanation": "Orca konnte sich über SSH nicht erneut koppeln; verbinde dich, um es noch einmal zu versuchen.",
|
||||
"connect_access_revoked_explanation": "Verbinden, um es erneut zu versuchen.",
|
||||
"server_replaced_explanation": "Wähle in Einstellungen › Remote-Orca-Server für diesen Server Vergessen… und verbinde dann den SSH-Host, um ihn mit seinem aktuellen Server zu koppeln.",
|
||||
"update_required_explanation": "Orca auf diesem Computer oder auf dem Server aktualisieren und anschließend erneut verbinden."
|
||||
},
|
||||
"NativeChatResumeStatusSegment": {
|
||||
"tooltip": "Unterbrochene Chats öffnen, die fortgesetzt werden können",
|
||||
@@ -5044,6 +5026,18 @@
|
||||
"accounts": "Gespeicherte Antigravity-Konten",
|
||||
"readAgo": "Ausgelesen {{time}}",
|
||||
"notRead": "Nutzung unbekannt: noch nicht ausgelesen"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "Dieser Host ist seit {{time}} nicht erreichbar.",
|
||||
"copy_error": "Fehler kopieren",
|
||||
"retry_now": "Jetzt erneut versuchen",
|
||||
"stop_reconnecting": "Erneutes Verbinden stoppen",
|
||||
"reconnecting_attempt": "Erneute Verbindung (Versuch {{attempt}})",
|
||||
"stop": "Stoppen",
|
||||
"ssh_sign_in_failed": "Anmeldung bei diesem Host fehlgeschlagen; prüfe seine SSH-Zugangsdaten.",
|
||||
"ssh_connect_failed": "Verbindung zu diesem Host fehlgeschlagen; prüfe seine SSH-Einstellungen und versuche es erneut.",
|
||||
"server": "Server",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4783,14 +4783,13 @@
|
||||
"orphanCount_other": "{{count}} orphans"
|
||||
},
|
||||
"SshStatusSegment": {
|
||||
"3ad70e0365": "Manage Remote Hosts…",
|
||||
"6e8a9a4242": "Remote Hosts",
|
||||
"3ad70e0365": "Manage remote hosts…",
|
||||
"6e8a9a4242": "Remote hosts",
|
||||
"fdc57e9970": "Remote host connection status",
|
||||
"59b553e2aa": "Disconnect",
|
||||
"63f36455cc": "Connect",
|
||||
"bf07aee59e": "Disconnect failed",
|
||||
"2c29e2de68": "Connection failed",
|
||||
"remote_server": "Remote Server",
|
||||
"runtime_checking": "Checking",
|
||||
"runtime_online": "Connected",
|
||||
"runtime_unavailable_transport_up": "Orca unavailable",
|
||||
@@ -4798,8 +4797,6 @@
|
||||
"runtime_connect_unavailable": "Remote host is not reachable",
|
||||
"runtime_disconnect_failed": "Disconnect failed",
|
||||
"runtime_reconnecting": "Reconnecting",
|
||||
"runtime_last_close_reason": "Closed: {{value0}}",
|
||||
"runtime_reconnect_attempt": "Attempt {{value0}}",
|
||||
"runtime_workspace_window_closed": "Workspace window closed",
|
||||
"connectedHostCount_one": "{{count}} host",
|
||||
"connectedHostCount_other": "{{count}} hosts",
|
||||
@@ -5094,9 +5091,6 @@
|
||||
"rateLimitResetsAvailable_one": "{{count}} rate-limit reset available",
|
||||
"rateLimitResetsAvailable_other": "{{count}} rate-limit resets available"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "SSH Host"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "{{value0}}% used",
|
||||
"remaining": "{{value0}}% left",
|
||||
@@ -5171,29 +5165,17 @@
|
||||
"offDescription": "Allow normal system sleep behavior"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "The previous connection closed",
|
||||
"workspace_window_closed": "The workspace window is closed",
|
||||
"checking_host": "Orca is checking whether this host is reachable",
|
||||
"restoring_connection": "Orca is trying to restore the connection",
|
||||
"host_unreachable": "Orca isn’t reachable on this host",
|
||||
"runtime_unavailable": "SSH transport is connected, but the Orca runtime is unavailable",
|
||||
"runtime_unavailable_explanation": "The remote host may still be running; only the Orca runtime connection is unavailable.",
|
||||
"contact_note": "The host may still be running; only the Orca connection is unavailable.",
|
||||
"last_connected": "Last connected {{value0}}",
|
||||
"reconnect_attempt": "Attempt {{value0}}",
|
||||
"access_revoked": "Access revoked",
|
||||
"access_revoked_summary": "This server revoked access for this computer",
|
||||
"access_revoked_explanation": "Re-pair with a new pairing link from the server to reconnect.",
|
||||
"managed_access_revoked_explanation": "Orca couldn't pair with it again over SSH. Connect to try again.",
|
||||
"connect_access_revoked_explanation": "Connect to try again.",
|
||||
"update_required": "Update required",
|
||||
"update_required_summary": "Orca versions are not compatible",
|
||||
"update_required_explanation": "Update Orca on this computer or on the server, then connect again.",
|
||||
"repair": "Re-pair…",
|
||||
"open_settings": "Open settings…",
|
||||
"server_replaced": "Different server",
|
||||
"server_replaced_summary": "This host now runs a different Orca server than the one this computer paired with",
|
||||
"server_replaced_explanation": "Orca connects to the host as a different SSH user, or its server was reinstalled. In Settings › Remote Orca Servers, open the ⋯ menu on this server and choose Forget…, then connect the SSH host to pair with its current server."
|
||||
"access_revoked_explanation": "Re-pair with a new pairing link from the server to reconnect.",
|
||||
"managed_access_revoked_explanation": "Orca couldn't pair with it again over SSH; connect to try again.",
|
||||
"connect_access_revoked_explanation": "Connect to try again.",
|
||||
"server_replaced_explanation": "In Settings › Remote Orca Servers, choose Forget… for this server, then connect the SSH host to pair with its current server.",
|
||||
"update_required_explanation": "Update Orca on this computer or on the server, then connect again."
|
||||
},
|
||||
"NativeChatResumeStatusSegment": {
|
||||
"tooltip": "Open interrupted chats available to resume",
|
||||
@@ -5308,6 +5290,18 @@
|
||||
"accounts": "Saved Antigravity Accounts",
|
||||
"readAgo": "Read {{time}}",
|
||||
"notRead": "Usage unknown: not read yet"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "Can't reach this host since {{time}}.",
|
||||
"copy_error": "Copy error",
|
||||
"retry_now": "Retry now",
|
||||
"stop_reconnecting": "Stop reconnecting",
|
||||
"reconnecting_attempt": "Reconnecting (attempt {{attempt}})",
|
||||
"stop": "Stop",
|
||||
"ssh_sign_in_failed": "Couldn’t sign in to this host; check its SSH credentials.",
|
||||
"ssh_connect_failed": "Couldn’t connect to this host; check its SSH settings and try again.",
|
||||
"server": "Server",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4075,15 +4075,12 @@
|
||||
"63f36455cc": "Conectar",
|
||||
"bf07aee59e": "Falló la desconexión",
|
||||
"2c29e2de68": "La conexión falló",
|
||||
"remote_server": "Servidor remoto",
|
||||
"runtime_checking": "Comprobando",
|
||||
"runtime_online": "Conectado",
|
||||
"runtime_unavailable": "Desconectado",
|
||||
"runtime_connect_unavailable": "No se puede acceder al host remoto",
|
||||
"runtime_disconnect_failed": "No se pudo desconectar",
|
||||
"runtime_reconnecting": "Reconectando",
|
||||
"runtime_last_close_reason": "Cerrado: {{value0}}",
|
||||
"runtime_reconnect_attempt": "Intento {{value0}}",
|
||||
"connectedHostCount_one": "{{count}} host",
|
||||
"connectedHostCount_other": "{{count}} hosts",
|
||||
"connectedHostCount_many": "{{count}} hosts",
|
||||
@@ -4361,9 +4358,6 @@
|
||||
"rateLimitResetsAvailable_other": "{{count}} reinicios de rate limit disponibles",
|
||||
"rateLimitResetsAvailable_many": "{{count}} reinicios de rate limit disponibles"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "Host SSH"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "{{value0}}% usado",
|
||||
"remaining": "{{value0}}% restante",
|
||||
@@ -4487,29 +4481,17 @@
|
||||
"ariaLabelCount_many": "{{count}} chats disponibles para reanudar"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "La conexión anterior cerrada.",
|
||||
"workspace_window_closed": "La ventana del espacio de trabajo está cerrada.",
|
||||
"checking_host": "Orca está comprobando si este host es accesible",
|
||||
"restoring_connection": "Orca está intentando restablecer la conexión.",
|
||||
"host_unreachable": "No se puede acceder a Orca en este host",
|
||||
"runtime_unavailable": "El transporte SSH está conectado, pero el tiempo de ejecución de Orca no está disponible",
|
||||
"runtime_unavailable_explanation": "Es posible que el host remoto todavía esté ejecutándose; sólo la conexión en tiempo de ejecución de Orca no está disponible.",
|
||||
"contact_note": "Es posible que el host todavía esté ejecutándose; sólo la conexión Orca no está disponible.",
|
||||
"last_connected": "Última conexión {{value0}}",
|
||||
"reconnect_attempt": "Intento {{value0}}",
|
||||
"access_revoked": "Access revoked",
|
||||
"access_revoked_summary": "Este servidor revocó el acceso a esta computadora",
|
||||
"access_revoked_explanation": "Vuelva a emparejar con un nuevo enlace de emparejamiento del servidor para volver a conectarse.",
|
||||
"managed_access_revoked_explanation": "Orca no pudo volver a emparejarse con él por SSH. Conéctate para intentarlo de nuevo.",
|
||||
"connect_access_revoked_explanation": "Conéctate para intentarlo de nuevo.",
|
||||
"update_required": "Update required",
|
||||
"update_required_summary": "Las versiones de Orca no son compatibles",
|
||||
"update_required_explanation": "Actualice Orca en esta computadora o en el servidor, luego conéctese nuevamente.",
|
||||
"repair": "Re-pair…",
|
||||
"open_settings": "Abrir ajustes…",
|
||||
"server_replaced": "Servidor diferente",
|
||||
"server_replaced_summary": "Este host ahora ejecuta un servidor Orca distinto al que estaba vinculado este equipo",
|
||||
"server_replaced_explanation": "Orca se conecta al host con otro usuario SSH o su servidor se ha reinstalado. En Ajustes › Servidores Orca remotos, abre el menú ⋯ de este servidor y elige Olvidar…; después conecta el host SSH para vincularlo con su servidor actual."
|
||||
"access_revoked_explanation": "Vuelva a emparejar con un nuevo enlace de emparejamiento del servidor para volver a conectarse.",
|
||||
"managed_access_revoked_explanation": "Orca no pudo volver a vincularse por SSH; conecta para intentarlo de nuevo.",
|
||||
"connect_access_revoked_explanation": "Conéctate para intentarlo de nuevo.",
|
||||
"server_replaced_explanation": "En Ajustes › Servidores remotos de Orca, elige Olvidar… para este servidor y luego conecta el host SSH para vincularlo con su servidor actual.",
|
||||
"update_required_explanation": "Actualice Orca en esta computadora o en el servidor, luego conéctese nuevamente."
|
||||
},
|
||||
"provider": {
|
||||
"extra": {
|
||||
@@ -4610,6 +4592,18 @@
|
||||
"accounts": "Cuentas de Antigravity guardadas",
|
||||
"readAgo": "Consultado {{time}}",
|
||||
"notRead": "Uso desconocido: aún no consultado"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "No se puede acceder a este host desde hace {{time}}.",
|
||||
"copy_error": "Copiar error",
|
||||
"retry_now": "Reintentar ahora",
|
||||
"stop_reconnecting": "Detener reconexión",
|
||||
"reconnecting_attempt": "Reconectando (intento {{attempt}})",
|
||||
"stop": "Detener",
|
||||
"ssh_sign_in_failed": "No se pudo iniciar sesión en este host; revisa sus credenciales SSH.",
|
||||
"ssh_connect_failed": "No se pudo conectar a este host; revisa su configuración SSH e inténtalo de nuevo.",
|
||||
"server": "Servidor",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4300,15 +4300,12 @@
|
||||
"63f36455cc": "Se connecter",
|
||||
"bf07aee59e": "Échec de la déconnexion",
|
||||
"2c29e2de68": "Échec de la connexion",
|
||||
"remote_server": "Serveur distant",
|
||||
"runtime_checking": "Vérification",
|
||||
"runtime_online": "Connecté",
|
||||
"runtime_unavailable": "Déconnecté",
|
||||
"runtime_connect_unavailable": "Hôte distant injoignable",
|
||||
"runtime_disconnect_failed": "Échec de la déconnexion",
|
||||
"runtime_reconnecting": "Reconnexion",
|
||||
"runtime_last_close_reason": "Fermé : {{value0}}",
|
||||
"runtime_reconnect_attempt": "Tentative {{value0}}",
|
||||
"runtime_workspace_window_closed": "Fenêtre de l'espace de travail fermée",
|
||||
"connectedHostCount_one": "{{count}} hôte",
|
||||
"connectedHostCount_other": "{{count}} hôtes",
|
||||
@@ -4591,9 +4588,6 @@
|
||||
"rateLimitResetsAvailable_other": "{{count}} réinitialisations de limite de débit disponibles",
|
||||
"rateLimitResetsAvailable_many": "{{count}} réinitialisations de limite de débit disponibles"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "Hôte SSH"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "{{value0}} % utilisé",
|
||||
"remaining": "{{value0}} % restants",
|
||||
@@ -4679,29 +4673,17 @@
|
||||
"offDescription": "Autoriser le comportement de veille normal du système"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "La connexion précédente a été fermée",
|
||||
"workspace_window_closed": "La fenêtre de l'espace de travail est fermée",
|
||||
"checking_host": "Orca vérifie si cet hôte est joignable",
|
||||
"restoring_connection": "Orca essaie de rétablir la connexion",
|
||||
"host_unreachable": "Orca n'est pas joignable sur cet hôte",
|
||||
"runtime_unavailable": "Le transport SSH est connecté, mais le runtime Orca n'est pas disponible",
|
||||
"runtime_unavailable_explanation": "L'hôte distant est peut-être toujours en cours d'exécution ; seule la connexion au runtime Orca est indisponible.",
|
||||
"contact_note": "L'hôte est peut-être toujours en cours d'exécution ; seule la connexion Orca est indisponible.",
|
||||
"last_connected": "Dernière connexion {{value0}}",
|
||||
"reconnect_attempt": "Tentative {{value0}}",
|
||||
"access_revoked": "Access revoked",
|
||||
"access_revoked_summary": "Ce serveur a révoqué l'accès à cet ordinateur",
|
||||
"access_revoked_explanation": "Ré-appairez avec un nouveau lien d'appairage du serveur pour vous reconnecter.",
|
||||
"managed_access_revoked_explanation": "Orca n'a pas pu s'associer de nouveau à lui via SSH. Connectez-vous pour réessayer.",
|
||||
"connect_access_revoked_explanation": "Connectez-vous pour réessayer.",
|
||||
"update_required": "Update required",
|
||||
"update_required_summary": "Les versions d'Orca ne sont pas compatibles",
|
||||
"update_required_explanation": "Mettez à jour Orca sur cet ordinateur ou sur le serveur, puis reconnectez-vous.",
|
||||
"repair": "Re-pair…",
|
||||
"open_settings": "Ouvrir les paramètres…",
|
||||
"server_replaced": "Serveur différent",
|
||||
"server_replaced_summary": "Cet hôte exécute désormais un serveur Orca différent de celui auquel cet ordinateur était associé",
|
||||
"server_replaced_explanation": "Orca se connecte à l’hôte avec un autre utilisateur SSH, ou son serveur a été réinstallé. Dans Paramètres › Serveurs Orca distants, ouvrez le menu ⋯ de ce serveur et choisissez Oublier…, puis connectez l’hôte SSH pour l’associer à son serveur actuel."
|
||||
"access_revoked_explanation": "Ré-appairez avec un nouveau lien d'appairage du serveur pour vous reconnecter.",
|
||||
"managed_access_revoked_explanation": "Orca n’a pas pu rétablir l’association via SSH ; connectez-vous pour réessayer.",
|
||||
"connect_access_revoked_explanation": "Connectez-vous pour réessayer.",
|
||||
"server_replaced_explanation": "Dans Paramètres › Serveurs Orca distants, choisissez Oublier… pour ce serveur, puis connectez l’hôte SSH pour l’associer à son serveur actuel.",
|
||||
"update_required_explanation": "Mettez à jour Orca sur cet ordinateur ou sur le serveur, puis reconnectez-vous."
|
||||
},
|
||||
"NativeChatResumeStatusSegment": {
|
||||
"tooltip": "Ouvrir les discussions interrompues disponibles pour reprendre",
|
||||
@@ -4835,6 +4817,18 @@
|
||||
"accounts": "Comptes Antigravity enregistrés",
|
||||
"readAgo": "Relevé {{time}}",
|
||||
"notRead": "Utilisation inconnue : pas encore relevée"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "Cet hôte est inaccessible depuis {{time}}.",
|
||||
"copy_error": "Copier l’erreur",
|
||||
"retry_now": "Réessayer maintenant",
|
||||
"stop_reconnecting": "Arrêter la reconnexion",
|
||||
"reconnecting_attempt": "Reconnexion (tentative {{attempt}})",
|
||||
"stop": "Arrêter",
|
||||
"ssh_sign_in_failed": "Impossible de se connecter à cet hôte ; vérifiez ses identifiants SSH.",
|
||||
"ssh_connect_failed": "Impossible de joindre cet hôte ; vérifiez ses paramètres SSH et réessayez.",
|
||||
"server": "Serveur",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -3997,15 +3997,12 @@
|
||||
"63f36455cc": "接続",
|
||||
"bf07aee59e": "切断に失敗しました",
|
||||
"2c29e2de68": "接続に失敗しました",
|
||||
"remote_server": "リモートサーバー",
|
||||
"runtime_checking": "確認中",
|
||||
"runtime_online": "接続済み",
|
||||
"runtime_unavailable": "切断済み",
|
||||
"runtime_connect_unavailable": "リモートホストに到達できません",
|
||||
"runtime_disconnect_failed": "切断に失敗しました",
|
||||
"runtime_reconnecting": "再接続中",
|
||||
"runtime_last_close_reason": "クローズ: {{value0}}",
|
||||
"runtime_reconnect_attempt": "試行 {{value0}}",
|
||||
"connectedHostCount_one": "{{count}} 台のホスト",
|
||||
"connectedHostCount_other": "{{count}} 台のホスト",
|
||||
"searchSshHosts": "SSH ホストを検索…",
|
||||
@@ -4268,9 +4265,6 @@
|
||||
"notYetUpdated": "未更新",
|
||||
"rateLimitResetsAvailable_other": "レート制限リセットが {{count}} 回利用可能"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "SSH ホスト"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "{{value0}}% 使用済み",
|
||||
"remaining": "残り {{value0}}%",
|
||||
@@ -4354,29 +4348,17 @@
|
||||
"runningSkills_other": "{{count}} 件のスキルを更新中…"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "以前の接続が閉じられました",
|
||||
"workspace_window_closed": "ワークスペースウィンドウが閉じられています",
|
||||
"checking_host": "Orca はこのホストが到達可能かどうかを確認しています",
|
||||
"restoring_connection": "Orca は接続を復元しようとしています",
|
||||
"host_unreachable": "このホストでは Orca にアクセスできません",
|
||||
"runtime_unavailable": "SSH トランスポートは接続されていますが、Orca ランタイムは使用できません",
|
||||
"runtime_unavailable_explanation": "リモートホストがまだ実行されている可能性があります。 Orca ランタイム接続のみが利用できません。",
|
||||
"contact_note": "ホストはまだ実行中の可能性があります。 Orca 接続のみが利用できません。",
|
||||
"last_connected": "最後に接続したのは {{value0}}",
|
||||
"reconnect_attempt": "{{value0}} を試みます",
|
||||
"access_revoked": "Access revoked",
|
||||
"access_revoked_summary": "このサーバーはこのコンピュータへのアクセスを取り消しました",
|
||||
"access_revoked_explanation": "サーバーで発行した新規ペアリングリンクで再度ペアリングし、接続し直してください。",
|
||||
"managed_access_revoked_explanation": "Orca は SSH 経由で再ペアリングできませんでした。接続してもう一度お試しください。",
|
||||
"connect_access_revoked_explanation": "接続してもう一度お試しください。",
|
||||
"update_required": "Update required",
|
||||
"update_required_summary": "Orca のバージョンに互換性がありません",
|
||||
"update_required_explanation": "このコンピュータまたはサーバーの Orca を更新してから、再度接続してください。",
|
||||
"repair": "Re-pair…",
|
||||
"open_settings": "設定を開く…",
|
||||
"server_replaced": "別のサーバー",
|
||||
"server_replaced_summary": "このホストでは、このコンピューターとペアリングしたものとは別の Orca サーバーが実行されています",
|
||||
"server_replaced_explanation": "Orca が別の SSH ユーザーとしてホストに接続しているか、サーバーが再インストールされました。「設定」›「リモート Orca サーバー」でこのサーバーの ⋯ メニューから「登録を解除…」を選び、SSH ホストに接続して現在のサーバーとペアリングしてください。"
|
||||
"access_revoked_explanation": "サーバーで発行した新規ペアリングリンクで再度ペアリングし、接続し直してください。",
|
||||
"managed_access_revoked_explanation": "Orca は SSH 経由で再ペアリングできなかったため、接続して再試行してください。",
|
||||
"connect_access_revoked_explanation": "接続してもう一度お試しください。",
|
||||
"server_replaced_explanation": "設定 › リモート Orca サーバーでこのサーバーの「削除…」を選択し、SSH ホストに接続して現在のサーバーとペアリングしてください。",
|
||||
"update_required_explanation": "このコンピュータまたはサーバーの Orca を更新してから、再度接続してください。"
|
||||
},
|
||||
"NativeChatResumeStatusSegment": {
|
||||
"tooltip": "中断されたチャットを開いて再開可能",
|
||||
@@ -4474,6 +4456,18 @@
|
||||
"accounts": "保存済み Antigravity アカウント",
|
||||
"readAgo": "{{time}} に取得",
|
||||
"notRead": "使用量は不明:未取得"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "{{time}}からこのホストに接続できません。",
|
||||
"copy_error": "エラーをコピー",
|
||||
"retry_now": "今すぐ再試行",
|
||||
"stop_reconnecting": "再接続を停止",
|
||||
"reconnecting_attempt": "再接続中({{attempt}} 回目)",
|
||||
"stop": "停止",
|
||||
"ssh_sign_in_failed": "このホストにサインインできませんでした。SSH 認証情報を確認してください。",
|
||||
"ssh_connect_failed": "このホストに接続できませんでした。SSH 設定を確認して再試行してください。",
|
||||
"server": "サーバー",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -3997,15 +3997,12 @@
|
||||
"63f36455cc": "연결",
|
||||
"bf07aee59e": "연결 해제 실패",
|
||||
"2c29e2de68": "연결 실패",
|
||||
"remote_server": "원격 서버",
|
||||
"runtime_checking": "확인 중",
|
||||
"runtime_online": "연결됨",
|
||||
"runtime_unavailable": "연결 끊김",
|
||||
"runtime_connect_unavailable": "원격 호스트에 연결할 수 없습니다.",
|
||||
"runtime_disconnect_failed": "연결 해제 실패",
|
||||
"runtime_reconnecting": "다시 연결 중",
|
||||
"runtime_last_close_reason": "닫힘: {{value0}}",
|
||||
"runtime_reconnect_attempt": "{{value0}}번째 시도",
|
||||
"connectedHostCount_one": "호스트 {{count}}개",
|
||||
"connectedHostCount_other": "호스트 {{count}}개",
|
||||
"searchSshHosts": "SSH 호스트 검색…",
|
||||
@@ -4268,9 +4265,6 @@
|
||||
"notYetUpdated": "아직 업데이트되지 않음",
|
||||
"rateLimitResetsAvailable_other": "속도 제한 재설정 {{count}}회 사용 가능"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "SSH 호스트"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "{{value0}}% 사용",
|
||||
"remaining": "{{value0}}% 남음",
|
||||
@@ -4354,29 +4348,17 @@
|
||||
"runningSkills_other": "스킬 {{count}}개 업데이트 중…"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "이전 연결이 종료되었습니다.",
|
||||
"workspace_window_closed": "워크스페이스 창이 닫혔습니다.",
|
||||
"checking_host": "Orca가 이 호스트에 연결할 수 있는지 확인 중입니다.",
|
||||
"restoring_connection": "Orca가 연결을 복원하려고 합니다.",
|
||||
"host_unreachable": "이 호스트에서는 Orca에 연결할 수 없습니다.",
|
||||
"runtime_unavailable": "SSH 전송이 연결되었지만 Orca 런타임을 사용할 수 없습니다.",
|
||||
"runtime_unavailable_explanation": "원격 호스트가 아직 실행 중일 수 있습니다. Orca 런타임 연결만 사용할 수 없습니다.",
|
||||
"contact_note": "호스트가 아직 실행 중일 수 있습니다. Orca 연결만 사용할 수 없습니다.",
|
||||
"last_connected": "마지막 연결 {{value0}}",
|
||||
"reconnect_attempt": "{{value0}} 시도",
|
||||
"access_revoked": "Access revoked",
|
||||
"access_revoked_summary": "이 서버가 이 컴퓨터에 대한 액세스를 취소했습니다.",
|
||||
"access_revoked_explanation": "다시 연결하려면 서버에서 새로운 페어링 링크로 다시 페어링하세요.",
|
||||
"managed_access_revoked_explanation": "Orca가 SSH로 다시 페어링하지 못했습니다. 연결하여 다시 시도하세요.",
|
||||
"connect_access_revoked_explanation": "연결하여 다시 시도하세요.",
|
||||
"update_required": "Update required",
|
||||
"update_required_summary": "Orca 버전이 호환되지 않습니다",
|
||||
"update_required_explanation": "이 컴퓨터나 서버의 Orca를 업데이트한 후 다시 연결하세요.",
|
||||
"repair": "Re-pair…",
|
||||
"open_settings": "설정 열기…",
|
||||
"server_replaced": "다른 서버",
|
||||
"server_replaced_summary": "이 호스트에서 이 컴퓨터와 페어링한 서버와 다른 Orca 서버가 실행 중입니다",
|
||||
"server_replaced_explanation": "Orca가 다른 SSH 사용자로 호스트에 연결하거나 서버가 다시 설치되었습니다. 설정 › 원격 Orca 서버에서 이 서버의 ⋯ 메뉴를 열고 삭제…를 선택한 다음 SSH 호스트에 연결하여 현재 서버와 페어링하세요."
|
||||
"access_revoked_explanation": "다시 연결하려면 서버에서 새로운 페어링 링크로 다시 페어링하세요.",
|
||||
"managed_access_revoked_explanation": "Orca가 SSH를 통해 다시 페어링하지 못했으니 연결하여 다시 시도하세요.",
|
||||
"connect_access_revoked_explanation": "연결하여 다시 시도하세요.",
|
||||
"server_replaced_explanation": "설정 › 원격 Orca 서버에서 이 서버의 잊기…를 선택한 다음 SSH 호스트에 연결하여 현재 서버와 페어링하세요.",
|
||||
"update_required_explanation": "이 컴퓨터나 서버의 Orca를 업데이트한 후 다시 연결하세요."
|
||||
},
|
||||
"NativeChatResumeStatusSegment": {
|
||||
"tooltip": "중단된 채팅을 열어 재개할 수 있습니다.",
|
||||
@@ -4474,6 +4456,18 @@
|
||||
"accounts": "저장된 Antigravity 계정",
|
||||
"readAgo": "{{time}}에 조회",
|
||||
"notRead": "사용량을 알 수 없음: 아직 조회하지 않음"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "{{time}}부터 이 호스트에 연결할 수 없습니다.",
|
||||
"copy_error": "오류 복사",
|
||||
"retry_now": "지금 다시 시도",
|
||||
"stop_reconnecting": "재연결 중지",
|
||||
"reconnecting_attempt": "재연결 중({{attempt}}번째 시도)",
|
||||
"stop": "중지",
|
||||
"ssh_sign_in_failed": "이 호스트에 로그인할 수 없으니 SSH 자격 증명을 확인하세요.",
|
||||
"ssh_connect_failed": "이 호스트에 연결할 수 없으니 SSH 설정을 확인하고 다시 시도하세요.",
|
||||
"server": "서버",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -3083,7 +3083,6 @@
|
||||
"63f36455cc": "Conectar",
|
||||
"bf07aee59e": "Falha ao desconectar",
|
||||
"2c29e2de68": "Falha na conexão",
|
||||
"remote_server": "Servidor Remoto",
|
||||
"runtime_checking": "Verificando",
|
||||
"runtime_online": "Conectado",
|
||||
"runtime_unavailable_transport_up": "Orca indisponível",
|
||||
@@ -3091,8 +3090,6 @@
|
||||
"runtime_connect_unavailable": "O host remoto não está acessível",
|
||||
"runtime_disconnect_failed": "Falha ao desconectar",
|
||||
"runtime_reconnecting": "Reconectando",
|
||||
"runtime_last_close_reason": "Fechado: {{value0}}",
|
||||
"runtime_reconnect_attempt": "Tentativa {{value0}}",
|
||||
"runtime_workspace_window_closed": "Janela do espaço de trabalho fechada",
|
||||
"connectedHostCount_one": "{{count}} host",
|
||||
"connectedHostCount_other": "{{count}} hosts",
|
||||
@@ -3384,9 +3381,6 @@
|
||||
"rateLimitResetsAvailable_other": "{{count}} redefinições de limite de taxa disponíveis",
|
||||
"rateLimitResetsAvailable_many": "{{count}} redefinições de limite de taxa disponíveis"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "Host SSH"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "{{value0}}% usado",
|
||||
"remaining": "{{value0}}% restante",
|
||||
@@ -3464,29 +3458,17 @@
|
||||
"offDescription": "Permitir o comportamento normal de suspensão do sistema"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "A conexão anterior foi encerrada",
|
||||
"workspace_window_closed": "A janela do espaço de trabalho está fechada",
|
||||
"checking_host": "O Orca está verificando se este host está acessível",
|
||||
"restoring_connection": "O Orca está tentando restaurar a conexão",
|
||||
"host_unreachable": "O Orca não está acessível neste host",
|
||||
"runtime_unavailable": "O transporte SSH está conectado, mas o runtime do Orca está indisponível",
|
||||
"runtime_unavailable_explanation": "O host remoto pode ainda estar em execução; apenas a conexão do runtime do Orca está indisponível.",
|
||||
"contact_note": "O host pode ainda estar em execução; apenas a conexão do Orca está indisponível.",
|
||||
"last_connected": "Última conexão {{value0}}",
|
||||
"reconnect_attempt": "Tentativa {{value0}}",
|
||||
"access_revoked": "Acesso revogado",
|
||||
"access_revoked_summary": "Este servidor revogou o acesso deste computador",
|
||||
"access_revoked_explanation": "Pareie novamente com um novo link de pareamento do servidor para reconectar.",
|
||||
"managed_access_revoked_explanation": "O Orca não conseguiu parear com ele novamente via SSH. Conecte para tentar novamente.",
|
||||
"connect_access_revoked_explanation": "Conecte para tentar novamente.",
|
||||
"update_required": "Atualização necessária",
|
||||
"update_required_summary": "As versões do Orca não são compatíveis",
|
||||
"update_required_explanation": "Atualize o Orca neste computador ou no servidor e conecte novamente.",
|
||||
"repair": "Parear novamente…",
|
||||
"open_settings": "Abrir configurações…",
|
||||
"server_replaced": "Servidor diferente",
|
||||
"server_replaced_summary": "Este host agora executa um servidor Orca diferente daquele pareado com este computador",
|
||||
"server_replaced_explanation": "O Orca se conecta ao host como outro usuário SSH ou o servidor foi reinstalado. Em Configurações › Servidores Orca Remotos, abra o menu ⋯ deste servidor e escolha Esquecer…; depois conecte o host SSH para parear com o servidor atual."
|
||||
"access_revoked_explanation": "Pareie novamente com um novo link de pareamento do servidor para reconectar.",
|
||||
"managed_access_revoked_explanation": "O Orca não conseguiu emparelhar novamente por SSH; conecte para tentar de novo.",
|
||||
"connect_access_revoked_explanation": "Conecte para tentar novamente.",
|
||||
"server_replaced_explanation": "Em Configurações › Servidores Orca remotos, escolha Esquecer… para este servidor e conecte o host SSH para emparelhá-lo com o servidor atual.",
|
||||
"update_required_explanation": "Atualize o Orca neste computador ou no servidor e conecte novamente."
|
||||
},
|
||||
"provider": {
|
||||
"extra": {
|
||||
@@ -3629,6 +3611,18 @@
|
||||
"accounts": "Contas Antigravity salvas",
|
||||
"readAgo": "Lido {{time}}",
|
||||
"notRead": "Uso desconhecido: ainda não consultado"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "Não é possível acessar este host desde {{time}}.",
|
||||
"copy_error": "Copiar erro",
|
||||
"retry_now": "Tentar novamente agora",
|
||||
"stop_reconnecting": "Parar reconexão",
|
||||
"reconnecting_attempt": "Reconectando (tentativa {{attempt}})",
|
||||
"stop": "Parar",
|
||||
"ssh_sign_in_failed": "Não foi possível entrar neste host; verifique suas credenciais SSH.",
|
||||
"ssh_connect_failed": "Não foi possível conectar a este host; verifique suas configurações SSH e tente novamente.",
|
||||
"server": "Servidor",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4655,7 +4655,6 @@
|
||||
"63f36455cc": "Подключить",
|
||||
"bf07aee59e": "Не удалось отключиться",
|
||||
"2c29e2de68": "Не удалось подключиться",
|
||||
"remote_server": "Удалённый сервер",
|
||||
"runtime_checking": "Проверка",
|
||||
"runtime_online": "Подключён",
|
||||
"runtime_unavailable_transport_up": "Orca недоступна",
|
||||
@@ -4663,8 +4662,6 @@
|
||||
"runtime_connect_unavailable": "Удалённый сервер недоступен",
|
||||
"runtime_disconnect_failed": "Не удалось отключиться",
|
||||
"runtime_reconnecting": "Повторное подключение",
|
||||
"runtime_last_close_reason": "Закрыто: {{value0}}",
|
||||
"runtime_reconnect_attempt": "Попытка {{value0}}",
|
||||
"runtime_workspace_window_closed": "Окно рабочего пространства закрыто",
|
||||
"connectedHostCount_one": "{{count}} сервер",
|
||||
"connectedHostCount_few": "{{count}} сервера",
|
||||
@@ -4976,9 +4973,6 @@
|
||||
"rateLimitResetsAvailable_many": "Доступно {{count}} сбросов лимита",
|
||||
"rateLimitResetsAvailable_other": "Доступно {{count}} сброса лимита"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "SSH-сервер"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "Использовано {{value0}}%",
|
||||
"remaining": "Осталось {{value0}}%",
|
||||
@@ -5059,29 +5053,17 @@
|
||||
"offDescription": "Разрешить обычный режим сна системы"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "Предыдущее соединение закрыто",
|
||||
"workspace_window_closed": "Окно рабочего пространства закрыто",
|
||||
"checking_host": "Orca проверяет доступность этого компьютера",
|
||||
"restoring_connection": "Orca пытается восстановить соединение",
|
||||
"host_unreachable": "Orca недоступна на этом компьютере",
|
||||
"runtime_unavailable": "SSH подключён, но среда выполнения Orca недоступна",
|
||||
"runtime_unavailable_explanation": "Удалённый компьютер может продолжать работу; недоступно только соединение со средой выполнения Orca.",
|
||||
"contact_note": "Компьютер может продолжать работу; недоступно только соединение с Orca.",
|
||||
"last_connected": "Последнее подключение: {{value0}}",
|
||||
"reconnect_attempt": "Попытка {{value0}}",
|
||||
"access_revoked": "Доступ отозван",
|
||||
"access_revoked_summary": "Этот сервер отозвал доступ для этого компьютера",
|
||||
"access_revoked_explanation": "Для подключения создайте сопряжение заново по новой ссылке с сервера.",
|
||||
"managed_access_revoked_explanation": "Orca не удалось восстановить сопряжение через SSH. Подключитесь, чтобы повторить попытку.",
|
||||
"connect_access_revoked_explanation": "Подключитесь, чтобы повторить попытку.",
|
||||
"update_required": "Требуется обновление",
|
||||
"update_required_summary": "Версии Orca несовместимы",
|
||||
"update_required_explanation": "Обновите Orca на этом компьютере или сервере, затем подключитесь снова.",
|
||||
"repair": "Создать сопряжение заново…",
|
||||
"open_settings": "Открыть настройки…",
|
||||
"server_replaced": "Другой сервер",
|
||||
"server_replaced_summary": "На этом хосте теперь работает другой сервер Orca, не тот, с которым сопряжён этот компьютер",
|
||||
"server_replaced_explanation": "Orca подключается к хосту как другой пользователь SSH или сервер был переустановлен. В разделе Настройки › Удалённые серверы Orca откройте меню ⋯ этого сервера и выберите «Забыть…», затем подключитесь к SSH-хосту для сопряжения с текущим сервером."
|
||||
"access_revoked_explanation": "Для подключения создайте сопряжение заново по новой ссылке с сервера.",
|
||||
"managed_access_revoked_explanation": "Orca не удалось повторно выполнить сопряжение по SSH; подключитесь, чтобы попробовать снова.",
|
||||
"connect_access_revoked_explanation": "Подключитесь, чтобы повторить попытку.",
|
||||
"server_replaced_explanation": "В разделе «Настройки › Удалённые серверы Orca» выберите «Забыть…» для этого сервера, затем подключите SSH-хост для сопряжения с его текущим сервером.",
|
||||
"update_required_explanation": "Обновите Orca на этом компьютере или сервере, затем подключитесь снова."
|
||||
},
|
||||
"NativeChatResumeStatusSegment": {
|
||||
"tooltip": "Открыть прерванные чаты, доступные для продолжения",
|
||||
@@ -5232,6 +5214,18 @@
|
||||
"accounts": "Сохранённые аккаунты Antigravity",
|
||||
"readAgo": "Считано {{time}}",
|
||||
"notRead": "Использование неизвестно: данные ещё не считаны"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "Этот хост недоступен с {{time}}.",
|
||||
"copy_error": "Копировать ошибку",
|
||||
"retry_now": "Повторить сейчас",
|
||||
"stop_reconnecting": "Остановить переподключение",
|
||||
"reconnecting_attempt": "Переподключение (попытка {{attempt}})",
|
||||
"stop": "Остановить",
|
||||
"ssh_sign_in_failed": "Не удалось войти на этот хост; проверьте его учётные данные SSH.",
|
||||
"ssh_connect_failed": "Не удалось подключиться к этому хосту; проверьте его настройки SSH и повторите попытку.",
|
||||
"server": "Сервер",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4513,7 +4513,6 @@
|
||||
"63f36455cc": "Bağlan",
|
||||
"bf07aee59e": "Bağlantı kesme başarısız oldu",
|
||||
"2c29e2de68": "Bağlantı başarısız oldu",
|
||||
"remote_server": "Uzak Sunucu",
|
||||
"runtime_checking": "Kontrol ediliyor",
|
||||
"runtime_online": "Bağlı",
|
||||
"runtime_unavailable_transport_up": "Orca kullanılamıyor",
|
||||
@@ -4521,8 +4520,6 @@
|
||||
"runtime_connect_unavailable": "Uzak ana bilgisayara ulaşılamıyor",
|
||||
"runtime_disconnect_failed": "Bağlantı kesme başarısız oldu",
|
||||
"runtime_reconnecting": "Yeniden bağlanılıyor",
|
||||
"runtime_last_close_reason": "Kapatıldı: {{value0}}",
|
||||
"runtime_reconnect_attempt": "Deneme {{value0}}",
|
||||
"runtime_workspace_window_closed": "Çalışma alanı penceresi kapatıldı",
|
||||
"connectedHostCount_one": "{{count}} ana bilgisayar",
|
||||
"connectedHostCount_other": "{{count}} ana bilgisayar",
|
||||
@@ -4814,9 +4811,6 @@
|
||||
"rateLimitResetsAvailable_other": "{{count}} hız sınırı sıfırlama hakkı kullanılabilir",
|
||||
"rateLimitResetsAvailable_one": "{{count}} hız sınırı sıfırlama hakkı kullanılabilir"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "SSH sunucusu"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "%{{value0}} kullanıldı",
|
||||
"remaining": "%{{value0}} kaldı",
|
||||
@@ -4891,29 +4885,17 @@
|
||||
"offDescription": "Normal sistem uyku davranışına izin ver"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "Önceki bağlantı kapandı",
|
||||
"workspace_window_closed": "Çalışma alanı penceresi kapalı",
|
||||
"checking_host": "Orca, bu ana bilgisayara ulaşılıp ulaşılamadığını kontrol ediyor",
|
||||
"restoring_connection": "Orca bağlantıyı geri yüklemeye çalışıyor",
|
||||
"host_unreachable": "Bu ana bilgisayardaki Orca'ya ulaşılamıyor",
|
||||
"runtime_unavailable": "SSH aktarımı bağlı ancak Orca çalışma zamanı kullanılamıyor",
|
||||
"runtime_unavailable_explanation": "Uzak ana bilgisayar hâlâ çalışıyor olabilir; yalnızca Orca çalışma zamanı bağlantısı kullanılamıyor.",
|
||||
"contact_note": "Ana bilgisayar hâlâ çalışıyor olabilir; yalnızca Orca bağlantısı kullanılamıyor.",
|
||||
"last_connected": "Son bağlantı: {{value0}}",
|
||||
"reconnect_attempt": "Deneme {{value0}}",
|
||||
"access_revoked": "Erişim iptal edildi",
|
||||
"access_revoked_summary": "Bu sunucu, bu bilgisayarın erişimini iptal etti",
|
||||
"access_revoked_explanation": "Yeniden bağlanmak için sunucudan alacağınız yeni bir eşleştirme bağlantısıyla tekrar eşleştirin.",
|
||||
"managed_access_revoked_explanation": "Orca, SSH üzerinden yeniden eşleştirme yapamadı. Tekrar denemek için bağlanın.",
|
||||
"connect_access_revoked_explanation": "Tekrar denemek için bağlanın.",
|
||||
"update_required": "Güncelleme gerekiyor",
|
||||
"update_required_summary": "Orca sürümleri uyumlu değil",
|
||||
"update_required_explanation": "Bu bilgisayardaki veya sunucudaki Orca'yı güncelleyin, ardından yeniden bağlanın.",
|
||||
"repair": "Yeniden eşleştir…",
|
||||
"open_settings": "Ayarları aç…",
|
||||
"server_replaced": "Farklı sunucu",
|
||||
"server_replaced_summary": "Bu ana makinede artık bu bilgisayarın eşleştiğinden farklı bir Orca sunucusu çalışıyor",
|
||||
"server_replaced_explanation": "Orca ana makineye farklı bir SSH kullanıcısı olarak bağlanıyor veya sunucu yeniden yüklendi. Ayarlar › Uzak Orca Sunucuları bölümünde bu sunucunun ⋯ menüsünü açıp Unut… seçeneğini seçin, ardından mevcut sunucuyla eşleştirmek için SSH ana makinesine bağlanın."
|
||||
"access_revoked_explanation": "Yeniden bağlanmak için sunucudan alacağınız yeni bir eşleştirme bağlantısıyla tekrar eşleştirin.",
|
||||
"managed_access_revoked_explanation": "Orca SSH üzerinden yeniden eşleştiremedi; tekrar denemek için bağlanın.",
|
||||
"connect_access_revoked_explanation": "Tekrar denemek için bağlanın.",
|
||||
"server_replaced_explanation": "Ayarlar › Uzak Orca Sunucuları bölümünde bu sunucu için Unut… seçeneğini seçin, ardından mevcut sunucusuyla eşleştirmek için SSH ana bilgisayarına bağlanın.",
|
||||
"update_required_explanation": "Bu bilgisayardaki veya sunucudaki Orca'yı güncelleyin, ardından yeniden bağlanın."
|
||||
},
|
||||
"NativeChatResumeStatusSegment": {
|
||||
"tooltip": "Devam edilebilecek yarım kalmış sohbetleri aç",
|
||||
@@ -5028,6 +5010,18 @@
|
||||
"accounts": "Kayıtlı Antigravity Hesapları",
|
||||
"readAgo": "Okunma zamanı: {{time}}",
|
||||
"notRead": "Kullanım bilinmiyor: henüz okunmadı"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "Bu ana makineye {{time}} itibarıyla ulaşılamıyor.",
|
||||
"copy_error": "Hatayı kopyala",
|
||||
"retry_now": "Şimdi yeniden dene",
|
||||
"stop_reconnecting": "Yeniden bağlanmayı durdur",
|
||||
"reconnecting_attempt": "Yeniden bağlanılıyor ({{attempt}}. deneme)",
|
||||
"stop": "Durdur",
|
||||
"ssh_sign_in_failed": "Bu ana makinede oturum açılamadı; SSH kimlik bilgilerini kontrol edin.",
|
||||
"ssh_connect_failed": "Bu ana makineye bağlanılamadı; SSH ayarlarını kontrol edip yeniden deneyin.",
|
||||
"server": "Sunucu",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4452,7 +4452,6 @@
|
||||
"63f36455cc": "連線",
|
||||
"bf07aee59e": "中斷連線失敗",
|
||||
"2c29e2de68": "連線失敗",
|
||||
"remote_server": "遠端伺服器",
|
||||
"runtime_checking": "檢查中",
|
||||
"runtime_online": "已連線",
|
||||
"runtime_unavailable_transport_up": "Orca 不可用",
|
||||
@@ -4460,8 +4459,6 @@
|
||||
"runtime_connect_unavailable": "遠端主機不可達",
|
||||
"runtime_disconnect_failed": "中斷連線失敗",
|
||||
"runtime_reconnecting": "重新連線中",
|
||||
"runtime_last_close_reason": "已關閉:{{value0}}",
|
||||
"runtime_reconnect_attempt": "第 {{value0}} 次嘗試",
|
||||
"runtime_workspace_window_closed": "工作區視窗已關閉",
|
||||
"connectedHostCount_one": "{{count}} 個主機",
|
||||
"connectedHostCount_other": "{{count}} 個主機",
|
||||
@@ -4735,9 +4732,6 @@
|
||||
"notYetUpdated": "尚未更新",
|
||||
"rateLimitResetsAvailable_other": "可重設速率限制 {{count}} 次"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "SSH 主機"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "已用 {{value0}}%",
|
||||
"remaining": "剩餘 {{value0}}%",
|
||||
@@ -4810,29 +4804,17 @@
|
||||
"offDescription": "允許正常的系統睡眠行為"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "之前的連線關閉了",
|
||||
"workspace_window_closed": "工作區視窗已關閉",
|
||||
"checking_host": "Orca 正在檢查該主機是否可達",
|
||||
"restoring_connection": "Orca 正在嘗試恢復連線",
|
||||
"host_unreachable": "在此主機上無法存取 Orca",
|
||||
"runtime_unavailable": "SSH 傳輸已連線,但 Orca 執行環境不可用",
|
||||
"runtime_unavailable_explanation": "遠端主機可能仍在運作;僅 Orca 執行環境連線不可用。",
|
||||
"contact_note": "主機可能仍在運作;僅 Orca 連線不可用。",
|
||||
"last_connected": "最後連線 {{value0}}",
|
||||
"reconnect_attempt": "第 {{value0}} 次嘗試",
|
||||
"access_revoked": "存取權已撤銷",
|
||||
"access_revoked_summary": "此伺服器已撤銷這台電腦的存取權限",
|
||||
"access_revoked_explanation": "使用伺服器提供的新配對連結重新配對,即可重新連線。",
|
||||
"managed_access_revoked_explanation": "Orca 無法透過 SSH 與此伺服器重新配對。請連線以重試。",
|
||||
"connect_access_revoked_explanation": "請連線以重試。",
|
||||
"update_required": "需要更新",
|
||||
"update_required_summary": "Orca 版本不相容",
|
||||
"update_required_explanation": "請更新這台電腦或伺服器上的 Orca,再重新連線。",
|
||||
"repair": "重新配對…",
|
||||
"open_settings": "開啟設定…",
|
||||
"server_replaced": "不同的伺服器",
|
||||
"server_replaced_summary": "此主機目前執行的 Orca 伺服器與此電腦配對的伺服器不同",
|
||||
"server_replaced_explanation": "Orca 正以其他 SSH 使用者連線至主機,或其伺服器已重新安裝。請在「設定」›「遠端 Orca 伺服器」中開啟此伺服器的 ⋯ 選單並選擇「忘記…」,然後連線至 SSH 主機以配對目前的伺服器。"
|
||||
"access_revoked_explanation": "使用伺服器提供的新配對連結重新配對,即可重新連線。",
|
||||
"managed_access_revoked_explanation": "Orca 無法透過 SSH 重新配對;請連線以重試。",
|
||||
"connect_access_revoked_explanation": "請連線以重試。",
|
||||
"server_replaced_explanation": "在「設定 › 遠端 Orca 伺服器」中,對此伺服器選擇「忘記…」,然後連線至 SSH 主機以與其目前的伺服器配對。",
|
||||
"update_required_explanation": "請更新這台電腦或伺服器上的 Orca,再重新連線。"
|
||||
},
|
||||
"NativeChatResumeStatusSegment": {
|
||||
"tooltip": "開啟可恢復的中斷聊天",
|
||||
@@ -4929,6 +4911,18 @@
|
||||
"accounts": "已儲存的 Antigravity 帳戶",
|
||||
"readAgo": "讀取於 {{time}}",
|
||||
"notRead": "用量未知:尚未讀取"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "自 {{time}} 起無法連線至此主機。",
|
||||
"copy_error": "複製錯誤",
|
||||
"retry_now": "立即重試",
|
||||
"stop_reconnecting": "停止重新連線",
|
||||
"reconnecting_attempt": "正在重新連線(第 {{attempt}} 次嘗試)",
|
||||
"stop": "停止",
|
||||
"ssh_sign_in_failed": "無法登入此主機,請檢查其 SSH 憑證。",
|
||||
"ssh_connect_failed": "無法連線至此主機,請檢查其 SSH 設定後重試。",
|
||||
"server": "伺服器",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -3997,15 +3997,12 @@
|
||||
"63f36455cc": "连接",
|
||||
"bf07aee59e": "断开连接失败",
|
||||
"2c29e2de68": "连接失败",
|
||||
"remote_server": "远程服务器",
|
||||
"runtime_checking": "检查中",
|
||||
"runtime_online": "已连接",
|
||||
"runtime_unavailable": "已断开",
|
||||
"runtime_connect_unavailable": "远程主机不可达",
|
||||
"runtime_disconnect_failed": "断开连接失败",
|
||||
"runtime_reconnecting": "重新连接中",
|
||||
"runtime_last_close_reason": "已关闭:{{value0}}",
|
||||
"runtime_reconnect_attempt": "第 {{value0}} 次尝试",
|
||||
"connectedHostCount_one": "{{count}} 个主机",
|
||||
"connectedHostCount_other": "{{count}} 个主机",
|
||||
"searchSshHosts": "搜索 SSH 主机…",
|
||||
@@ -4268,9 +4265,6 @@
|
||||
"notYetUpdated": "尚未更新",
|
||||
"rateLimitResetsAvailable_other": "可重置速率限制 {{count}} 次"
|
||||
},
|
||||
"SshTargetStatusRow": {
|
||||
"sshHost": "SSH 主机"
|
||||
},
|
||||
"usagePercentageLabel": {
|
||||
"used": "已用 {{value0}}%",
|
||||
"remaining": "剩余 {{value0}}%",
|
||||
@@ -4354,29 +4348,17 @@
|
||||
"runningSkills_other": "正在更新 {{count}} 个技能…"
|
||||
},
|
||||
"RuntimeHostStatusRow": {
|
||||
"previous_connection_closed": "之前的连接关闭了",
|
||||
"workspace_window_closed": "工作区窗口已关闭",
|
||||
"checking_host": "Orca 正在检查该主机是否可达",
|
||||
"restoring_connection": "Orca 正在尝试恢复连接",
|
||||
"host_unreachable": "在此主机上无法访问 Orca",
|
||||
"runtime_unavailable": "SSH 传输已连接,但 Orca 运行时不可用",
|
||||
"runtime_unavailable_explanation": "远程主机可能仍在运行;仅 Orca 运行时连接不可用。",
|
||||
"contact_note": "主机可能仍在运行;仅 Orca 连接不可用。",
|
||||
"last_connected": "最后连接 {{value0}}",
|
||||
"reconnect_attempt": "尝试{{value0}}",
|
||||
"access_revoked": "Access revoked",
|
||||
"access_revoked_summary": "该服务器已撤销对此计算机的访问权限",
|
||||
"access_revoked_explanation": "使用服务器新生成的配对链接重新配对,以恢复连接。",
|
||||
"managed_access_revoked_explanation": "Orca 无法通过 SSH 重新与其配对。请连接以重试。",
|
||||
"connect_access_revoked_explanation": "请连接以重试。",
|
||||
"update_required": "Update required",
|
||||
"update_required_summary": "Orca 版本不兼容",
|
||||
"update_required_explanation": "更新此计算机或服务器上的 Orca,然后重新连接。",
|
||||
"repair": "Re-pair…",
|
||||
"open_settings": "打开设置…",
|
||||
"server_replaced": "不同的服务器",
|
||||
"server_replaced_summary": "此主机现在运行的 Orca 服务器与此计算机配对的服务器不同",
|
||||
"server_replaced_explanation": "Orca 正以其他 SSH 用户连接主机,或者其服务器已重新安装。请在“设置”›“远程 Orca 服务器”中打开此服务器的 ⋯ 菜单并选择“遗忘…”,然后连接 SSH 主机以配对当前服务器。"
|
||||
"access_revoked_explanation": "使用服务器新生成的配对链接重新配对,以恢复连接。",
|
||||
"managed_access_revoked_explanation": "Orca 无法通过 SSH 重新配对;请连接以重试。",
|
||||
"connect_access_revoked_explanation": "请连接以重试。",
|
||||
"server_replaced_explanation": "在「设置 › 远程 Orca 服务器」中,对此服务器选择「忘记…」,然后连接 SSH 主机以与其当前服务器配对。",
|
||||
"update_required_explanation": "更新此计算机或服务器上的 Orca,然后重新连接。"
|
||||
},
|
||||
"NativeChatResumeStatusSegment": {
|
||||
"tooltip": "打开可恢复的中断聊天",
|
||||
@@ -4474,6 +4456,18 @@
|
||||
"accounts": "已保存的 Antigravity 账户",
|
||||
"readAgo": "读取于 {{time}}",
|
||||
"notRead": "用量未知:尚未读取"
|
||||
},
|
||||
"RemoteHostStatusRow": {
|
||||
"unreachable_since": "自 {{time}} 起无法连接此主机。",
|
||||
"copy_error": "复制错误",
|
||||
"retry_now": "立即重试",
|
||||
"stop_reconnecting": "停止重新连接",
|
||||
"reconnecting_attempt": "正在重新连接(第 {{attempt}} 次尝试)",
|
||||
"stop": "停止",
|
||||
"ssh_sign_in_failed": "无法登录此主机,请检查其 SSH 凭据。",
|
||||
"ssh_connect_failed": "无法连接此主机,请检查其 SSH 设置后重试。",
|
||||
"server": "服务器",
|
||||
"ssh": "SSH"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user