Files
orca/tests/e2e
Pr1pandNeil 3585a38b72 fix(plugins): resolve workspace context for remote active workspaces (#38671)
* fix(plugins): resolve the active workspace context on remote hosts

* fix(plugins): scope the remote workspace context to its host

* docs(plugins): document the remote context resolver

* fix(plugins): keep remote context ids raw and never fall back for local rows

The stored-row fallback returned host-qualified ids (ssh:host|repo::path), which no
terminal selector or agent-status row matches, so agents.list stayed empty for the
remote workspace. It also answered for a removed local worktree, turning a stale
focus that used to read null into a context for a workspace that no longer exists.

* fix(plugins): resolve a focused paired-server workspace from the desktop's server rows

A paired orcad server's workspaces live in that server's store, so neither the local
catalog nor the desktop's stored rows can name one and workspace.readContext,
workspace.changed and agents.list saw no context. The runtime now asks the relay host
catalog, which answers from the worktree.ps rows the desktop already caches. Only a
miss on a reachable server fetches, bounded at 1.5 s and at most once per 10 s per
missing workspace; an unreachable or hung server answers null.

* fix(plugins): keep a stale local focus stamp resolving as before, and cover #38653 end to end

A focus stamped 'local' whose repo row now routes elsewhere resolved through the
unscoped selector before #38653; the host-scoped lookup turned it into null. A
local stamp now retries unscoped, so local and unstamped focus answers exactly
what main did. Remote stamps keep the scoped lookup, so a paired-server focus
never borrows a local twin's context.

Tests: real-git parity of local, folder and SSH contexts against the pre-change
selector answer for every session shape the renderer writes; panel polling
against a hung or failing server (one fetch, one bounded wait per 10 s window);
an e2e that pairs a desktop with a headless Orca server, clicks a local and a
server row, reads workspace.readContext from a plugin panel, and keeps polling
fast after the server goes away.

---------

Co-authored-by: Neil <neil@stably.ai>
2026-11-07 03:04:32 -08:00
..