Repository navigation
fix(runtime): resolve folder workspaces wherever a command can be given one - #35223
Conversation
…folder id can arrive The Git-only selector resolver never matches project-group folder workspaces (no repo row), so worktree show/sleep, terminal list by workspace key, the active-terminal fallback, scrollback reads, Kitty file reads, Linear --current, browser commands, plugin context and the session tab fallbacks failed with selector_not_found for them. Route those callers through resolveWorkspaceSelector and rename the Git-only resolver to resolveGitWorktreeSelector so it reads as the repo-backed catalog only. Refs STA-12562
… on the renamed resolver Refs STA-12562
… the Linear meta backfill Skill installs fence a worktreeId by repo rows, so a folder id there must come through folderWorkspaceId, where its own host fence applies. Linear --current answers a folder's legacy link without writing a worktreeMeta row keyed by the folder id. Refs STA-12562
|
No actionable comments were generated in the recent review.
|
main (stablyai#35223) now resolves Folder Workspace selectors for browser commands, terminal listing and worktree show, so this commit keeps only what that change left out: help text naming folder:<id> for the workspace-scoped --worktree flags (commands that stay git-only keep the old text), and runtime coverage that browser snapshot and explicit-page targeting stay on the named Folder Workspace.
ELI5
Some Orca commands looked up a workspace with a lookup that only knows Git worktrees. Given a folder workspace, they said "not found". The same mistake broke Sleep in STA-12562. Every command that can be handed a folder workspace now uses the lookup that understands both. The Git-only lookup is renamed so it can't be picked up by mistake again.
What Changed
folder:<uuid>, with no repo row) failed withselector_not_foundin these commands:orca worktree show,worktree.sleepfrom the CLI or a phone, terminal list by folder key, the active-terminal fallback, scrollback reads, plugin workspace context, Linear--currentfrom a folder terminal, browser tab list/target/close and Kitty image reads.resolveWorkspaceSelector, the shared resolver from fix(runtime): sleep and stop resolve project-group folder workspaces #35082: folder workspace first, then Git. Explicit-id shortcuts are kept where they were correct.resolveGitWorktreeSelector, with a doc line pointing toresolveWorkspaceSelector. No call to the old name remains.folderWorkspaceId, which applies the folder's own host fence.--currentwrites no stray worktree metadata for a folder.Why
STA-12562 was one case of a general problem: a Git-only resolver receiving folder ids. Fixing only Sleep would have left the same failure in a dozen other commands. Renaming the Git-only resolver makes the choice explicit at every call site.
Linked Issue
Refs STA-12562 (follow-up to #35082). Thanks to toshi-brain for the report that exposed the class.
Visual Proof
N/A. This is runtime resolution only; the commands above now succeed for folder workspaces instead of returning
selector_not_found.Testing
project-group-folder-workspace-selectors.test.ts(9 cases),orca-runtime-read-kitty-file.test.ts(2) and a skill-install authority case. All fail on main and pass with this change.pnpm check:changed --maxWorkers=2: 20/20 passed before the rebase.pnpm tc:nodeis clean, and every test related to the 75 changed files passes (598 files, 7838 tests).Notes
Host fencing is unchanged. A folder workspace takes its host from
executionHostId, thenconnectionId, then local, so SSH, runtime and WSL folders resolve only to their own host. No RPC schema changed, and the renamed ports are in-process only, so mixed versions are unaffected.Follow-up: Linear
--currentrun by working directory inside a folder workspace still matches Git rows only. Many folder workspaces can share one path, so that needs its own ambiguity rule.