Skip to content

fix: open isolated multi-repo runs as a multi-root workspace - #294

Merged
LoganRupe merged 1 commit into
multi-repo-workspacesfrom
bug/125/open-isolated-runs-as-workspace
Sep 23, 2026
Merged

LoganRupe merged 1 commit into
multi-repo-workspacesfrom
bug/125/open-isolated-runs-as-workspace

Conversation

@LoganRupe

@LoganRupe LoganRupe commented Sep 23, 2026

Copy link
Copy Markdown
Owner

What Changed

The isolated-run worktree fan-out now writes a copy of the project's .code-workspace into the per-thread directory (<worktreesDir>/<projectId>/<threadId>/<name>.code-workspace). Each repo folder in the copy points at that thread's worktree (as a relative path); folders that aren't repos, like a docs dir, keep their original absolute path. settings and other keys carry over.

"Open in" hands that copy to workspace-aware editors when the thread has fanned-out worktrees. Client and server derive its path with one shared helper, threadWorkspaceFilePath in packages/shared/src/path.ts.

Threads created before this have no copy on disk, so the editor launcher now checks the workspace file exists and falls back to the directory instead of a failed open.

The file lives in the per-thread directory, so it goes when that directory does. No extra cleanup code.

Why

Fixes #125. For a .code-workspace project, "Open in" on an isolated run opened only the anchor worktree as a plain folder, so the other repos were missing from the editor. Pointing at the project's own workspace file would have opened the original checkouts instead of the thread's worktrees.

Verified: path.test.ts, WorktreeFanout.test.ts and externalLauncher.test.ts pass; server and web typecheck clean. In a real dev build, an isolated run opens as shop (Workspace) with every repo, and a pre-fix thread still opens its anchor folder with no error.

UI Changes

Before/after, "Open in" on an isolated run of a three-folder workspace (two repos plus a non-repo docs folder):

issue-125-before-after.mp4

"Open in" on an isolated run opened the anchor worktree as a plain
folder, so the other repos were missing from the editor.

The worktree fan-out now writes a copy of the project's .code-workspace
into the per-thread directory, with each repo folder pointed at its
worktree and non-repo folders left at their original path. The client
opens that copy for fanned-out threads. Threads created before this
have no copy, so the launcher falls back to the directory when the
workspace file is missing.

Fixes #125
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Sep 23, 2026
@LoganRupe
LoganRupe merged commit a12e441 into multi-repo-workspaces Sep 23, 2026
7 of 17 checks passed
LoganRupe added a commit that referenced this pull request Sep 24, 2026
"Open in" on an isolated run opened the anchor worktree as a plain
folder, so the other repos were missing from the editor.

The worktree fan-out now writes a copy of the project's .code-workspace
into the per-thread directory, with each repo folder pointed at its
worktree and non-repo folders left at their original path. The client
opens that copy for fanned-out threads. Threads created before this
have no copy, so the launcher falls back to the directory when the
workspace file is missing.

Fixes #125

Co-authored-by: Logan Rupe <logzerroneous@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants