Skip to content

fix(runtime): paired clients see a folder-upgraded Git project under the host workspace id - #30190

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-30150-folder-upgrade-wt-id
Oct 18, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-30150-folder-upgrade-wt-id

Conversation

@nwparker

@nwparker nwparker commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​114 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​114
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​5 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4

ELI5

When a folder project is later turned into a Git project, the host keeps calling its main workspace by the folder's original path (on Windows, D:\project\a). One of the lists the host sends to paired desktop clients used Git's spelling of the same path instead (D:/project/a). The client then thought it was a different workspace: no display name, no live terminals, gray dot. The host now sends that list with the same name it uses everywhere else.

What Changed

  • Before: on a Windows host, a paired client showed a folder-upgraded Git project's main workspace labelled with its branch (main) and a gray dot, and opening it showed empty terminal panes, even while the host had live terminals in it. The CLI on the host (orca worktree list) showed it correctly.
  • After: the paired client gets the same workspace id as the host, so the display name, live terminals and green dot show up.

Mechanism: paired desktop clients load workspaces with worktree.detectedList. On the host, that method built its rows straight from the raw git worktree list scan. The other runtime listings (worktree.list, worktree.ps, id resolution) run preserveFolderUpgradeWorktreePath, which maps Git's spelling of a folder-upgraded checkout back to the project's path. detectedList skipped that step. The fix applies it once in listRepoWorktreesForListing, the scan that every runtime listing reads, including the detected listing's metadata and lineage pruning.

Why

  • Fix it on the host, not the client. The host owns the workspace's identity: its metadata, terminals and agent status are all keyed by the folder spelling. Making the host publish one spelling everywhere fixes every client, including older desktop and mobile clients, with no wire change. A client-side alias like the one fix(runtime): resolve session tab workspace path aliases #29543 added for session.tabs.list would have to be repeated for every consumer of the id (metadata, terminals, status, selection). It also would not stop the host's own detected-list pruning from comparing against the wrong spelling.
  • Fix it at the shared scan, not inside detectedList. Putting it in the listing scan means any new runtime listing gets it automatically. The existing call in the row resolver stays as a safety net for its stored-rows fallback, and running it twice changes nothing.
  • Mixed versions: a new client talking to an old host still sees the old behaviour until the host updates. An old client talking to a new host is fixed. SSH-hosted repos compare by path only (no realpath), and macOS/Linux only change when Git's spelling differs from the project's (for example through a symlink), which is the case the helper already handled for the other listings.

Linked Issue

Fixes #30150

Visual Proof

N/A: this changes which id the host publishes. I verified it with the real RPC responses on a Windows host (below) instead of screenshots.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Verified live on a real Windows 11 host (awin-lan), using an isolated profile under %TEMP% (its own ORCA_USER_DATA_PATH, USERPROFILE, APPDATA, LOCALAPPDATA) and its own port, reached through an SSH tunnel. The paired client was this branch's RuntimeClient running on macOS. I never touched the user's own Orca install or servers, and everything was deleted afterwards.

  1. Stock 1.4.229 (the reported version, unpacked from the release installer): added folder …\orca-30150\proj\a, set its display name to Draft 30150, ran git init plus one commit, then repo.update {kind: git}. This stamped folderUpgradeGitRootPath: C:/Users/…/proj/a.
    • worktree.list → id …::C:\Users\…\proj\a, displayName Draft 30150
    • worktree.detectedList (what paired desktop clients use) → id …::C:/Users/…/proj/a, displayName main. This reproduces the bug.
  2. The same 1.4.229 build with only this one-line change patched into its orcad bundle, run against the same profile:
    • worktree.detectedList → id …::C:\Users\…\proj\a, displayName Draft 30150. Existing affected repos recover; the user doesn't need to re-add them.
    • A second folder upgraded fresh on the patched build gave the same result.

What I did not verify live: the desktop client's sidebar UI rendering. I checked the RPC payload it consumes instead.

Automated tests: src/main/runtime/folder-upgrade-runtime-listing.test.ts runs the real OrcaRuntimeService with a mocked Git scan. It fails without the fix (detected id D:/project/a, displayName main) and passes with it. Single-worker runs of the neighbouring runtime listing tests pass. The full static-analysis job steps from pr.yml pass locally (the bun typecheck step can't run on this machine; pnpm tc passes). orca-runtime.test.ts has one failure that also happens on main on macOS: a /var vs /private/var tmpdir symlink in a clone test, unrelated to this change.

Codex review (gpt-6.1-sol, high): no findings.

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Security: no change. Cross-platform: the path comparison is the existing areWorktreePathsEqual helper. SSH: a remote repo's rows only go through path equality. Mobile: it reads the same host listings and benefits the same way. Performance: the helper does nothing unless the repo has folderUpgradeGitRootPath.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…e host's id

worktree.detectedList built its rows from the raw Git scan, so a folder project upgraded to Git
was published under Git's spelling (C:/x) while the host keyed its metadata and terminals by the
folder's (C:\x). Apply preserveFolderUpgradeWorktreePath at the runtime listing scan every
runtime listing reads.

Fixes #30150
@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 5 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 737e670f-b84f-44f6-b42d-727dd392fe30
📥 Commits

Reviewing files that changed from the base of the PR and between a42049f and 412279e.

📒 Files selected for processing: 2
  • src/main/runtime/folder-upgrade-runtime-listing.test.ts
  • src/main/runtime/workspaces/workspace-catalog.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker nwparker changed the title fix(runtime) paired clients see a folder-upgraded Git project under the host workspace id fix(runtime): paired clients see a folder-upgraded Git project under the host workspace id Oct 18, 2026
@nwparker
nwparker merged commit bbdbe72 into main Oct 18, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Paired client shows folder-upgraded git repos on a Windows host as inactive (main worktree ID separator mismatch)

1 participant