Files
orca/src/cli/specs/managed-server.ts
T
NeilandClaude 0ee13f831d fix(ssh): say "Orca on <host>" instead of "managed server" in the UI (#31099)
* fix(ssh): say where Orca runs instead of "managed server" in the UI

Users read "managed server" as hosting run by someone else, so they declined
moving their SSH hosts. Every user-facing string now says "Orca on <host>" or
"this host's Orca server", in all six locales; Settings > "Orca on your SSH
hosts" and the setup line say the code and files stay where they are and only
Orca's list of projects, tabs and terminals moves to the host. CLI command names,
logs and identifiers are unchanged.

Fixes #30880

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(ssh): reassure only when something moves; name the host's label in its row

Review follow-ups: the reassurance shows only while Orca sets itself up or
moves a host, not on every reconnect; the converting line no longer repeats it;
the row names the SSH host's current label; the section description and the
Move anyway dialog stop repeating themselves; translate the Restart dialog's
buttons; drop "managed" from the remaining raw causes and the external
automation refusal.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 04:18:08 -07:00

91 lines
4.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { CommandSpec } from '../args'
import { GLOBAL_FLAGS } from '../args'
const SELECTOR_NOTE =
'--environment names a managed Orca server this machine deployed over SSH (see `orca environment list`); it is a selector here, not a routing flag.'
const DESKTOP_NOTE =
'Runs on this machine’s Orca desktop app, the same action as Settings > Orca on your SSH hosts. A runtime without the SSH registry (headless `orca serve`) refuses it.'
export const MANAGED_SERVER_COMMAND_SPECS: CommandSpec[] = [
{
path: ['environment', 'status'],
summary: 'Show a managed Orca server’s active version, terminals and pending work',
usage: 'orca environment status --environment <selector> [--json]',
allowedFlags: [...GLOBAL_FLAGS],
notes: [SELECTOR_NOTE, DESKTOP_NOTE],
examples: ['orca environment status --environment build-box']
},
{
path: ['environment', 'update'],
summary: 'Update a managed Orca server to this build’s version',
usage: 'orca environment update --environment <selector> [--force] [--json]',
allowedFlags: [...GLOBAL_FLAGS, 'force'],
notes: [
'Without --force, an update that would restart over running terminals is deferred and reported, not applied.',
SELECTOR_NOTE,
DESKTOP_NOTE
],
examples: ['orca environment update --environment build-box']
},
{
path: ['environment', 'rollback'],
destructive: true,
summary: 'Roll a managed Orca server back to its previous version',
usage: 'orca environment rollback --environment <selector> [--json]',
allowedFlags: [...GLOBAL_FLAGS],
notes: [SELECTOR_NOTE, DESKTOP_NOTE]
},
{
path: ['environment', 'recover'],
summary: 'Finish or undo a managed Orca server’s interrupted update, rollback or stop',
usage:
'orca environment recover --environment <selector> [--accept-changed-state --yes] [--json]',
allowedFlags: [...GLOBAL_FLAGS, 'accept-changed-state', 'yes'],
notes: [
'When a rejected build changed profile state, recover refuses rather than restart the previous build over it. --accept-changed-state --yes restores the prelaunch snapshot instead, the same as Restore in Settings > Orca on your SSH hosts; what the rejected build changed is discarded.',
SELECTOR_NOTE,
DESKTOP_NOTE
],
examples: [
'orca environment recover --environment build-box',
'orca environment recover --environment build-box --accept-changed-state --yes'
]
},
{
path: ['environment', 'stop'],
destructive: true,
summary: 'Stop a managed Orca server and unlink it from this machine (decommission)',
usage: 'orca environment stop --environment <selector> --yes [--json]',
allowedFlags: [...GLOBAL_FLAGS, 'yes'],
notes: [
'Stops orcad on the SSH host and, once the host proves it exited, removes the server from this machine. Its terminals end. Requires --yes.',
'If the host cannot prove orcad exited, the server stays linked and the refusal says why; nothing is removed on a guess. For a host that is gone for good, use `orca environment forget`.',
'If this server is the default host for new projects, choose another one first. `orca environment cancel-stop` withdraws a stop orcad has not acted on yet.',
SELECTOR_NOTE,
DESKTOP_NOTE
],
examples: ['orca environment stop --environment build-box --yes']
},
{
path: ['environment', 'forget'],
destructive: true,
summary: 'Unlink a managed Orca server whose SSH host is gone, without stopping it',
usage: 'orca environment forget --environment <selector> --yes [--json]',
allowedFlags: [...GLOBAL_FLAGS, 'yes'],
notes: [
'Removes the server from this machine without contacting its host, so the SSH host can then be removed. Use it when the host was deleted or can never be reached again. Requires --yes.',
'Nothing on the host is stopped: if it comes back, orcad may still be running there, and connecting to it again relinks it.',
SELECTOR_NOTE,
DESKTOP_NOTE
],
examples: ['orca environment forget --environment build-box --yes']
},
{
path: ['environment', 'cancel-stop'],
summary: 'Withdraw a managed Orca server stop that orcad has not acted on yet',
usage: 'orca environment cancel-stop --environment <selector> [--json]',
allowedFlags: [...GLOBAL_FLAGS],
notes: [SELECTOR_NOTE, DESKTOP_NOTE]
}
]