Files
orca/config
Jinwoo Hong 0e36bfa4a7 fix(automations): send managed SSH host automations to its Orca server (#39160)
* fix(automations): send managed SSH host automations to its Orca server

A managed SSH host's automations live on its Orca server (#24863), but the
create dialog, CLI and mobile still saved desktop copies that never ran.

- Desktop dialog: the host's desktop SSH entry is no longer offered; its
  key resolves to the host's server entry.
- CLI create routes to the server by project id, or asks to move the
  project there first; mobile hands the create to the server's editor.
- Existing desktop copies skip with "{host} now runs automations on its
  Orca server" and offer "Move to {host}" through the editor's move save.

STA-13422

* fix(automations): address review on managed SSH host routing

- CLI: refuse a desktop copy when the desktop reports a managed host this
  CLI holds no server for; pass the workspace by id to the server; check
  field support on the server too.
- Main: the skip follows the owner selector, so local rows pinned to a
  managed host's workspace skip too.
- Editor: a destination host whose project table loads after open keeps
  the chosen project.

* fix(automations): refuse new desktop rows on a managed SSH host and move leftovers

Per review and the owner's follow-up:
- The desktop's automation create/update refuses a row on a managed SSH
  host ("Move this project to {host} first."), covering CLI, mobile, raw
  RPC and older clients.
- Existing desktop copies move to the host's Orca server on startup, on
  managed connect and on their due tick: created there keyed by the
  desktop row id, then removed here. A server without the project leaves
  the skip and the Move button.
- Mobile drops the Save-time hand-off; its picker no longer offers a
  managed host's desktop SSH setup.
- CLI routes only for a local client, using that client's profile.

* fix(automations): drop the automatic leftover move

A managed host's leftover desktop rows keep the skip reason and the
Move to {host} button; moving them automatically will extend the existing
managed-host migration in a follow-up.

* fix(cli): resolve an automation's SSH destination from the repo's routing id

* chore: prune the repo host read baseline for the CLI destination

* fix(automations): migrate a leftover automation in one click

The detail banner's Migrate runs the editor's own move-to-server save without
opening the dialog. Leftovers show Needs migration instead of Enabled, and
their skipped runs read Needs migration to {host}.

* fix(automations): wrap the Needs migration status instead of cutting it off

* fix(automations): name a leftover's project from its migrated copy

* fix(automations): save a host move against the project table loaded after the editor opened

Migrate loads the server's repo table first, but the save transaction read the
destination captured before that load, so the first click on a cold catalog was
refused. Save now reads the same derived destination the form already shows.

* fix(automations): drop the leftover project-name fallback

The global id lookup could name another host's project. Scoping it to the
leftover's server is not worth the code for a display-only label, so a leftover
whose project moved shows Unknown project again.

* fix(automations): name a leftover's project from its migrated copy

A managed SSH leftover's project always moves to the host's Orca server with
the same id, so only those rows fall back to the id lookup; any other row with a
missing project stays Unknown project.
2026-11-07 01:47:06 -05:00
..