Repository navigation
refactor(core): replace project copies with worktrees - #42149
Merged
Merged
Conversation
jlongster
force-pushed
the
project-copy-api
branch
from
August 12, 2026 21:57
dd4c33c to
b79e75e
Compare
jlongster
force-pushed
the
project-copy-api
branch
from
August 13, 2026 18:39
b79e75e to
55b887a
Compare
jlongster
commented
Aug 13, 2026
| projectID: sync().data.project, | ||
| strategy: "git_worktree", | ||
| strategy: "git", | ||
| from: projectDirectory, |
Contributor
Author
There was a problem hiding this comment.
we can remove from here right, it defauts to project's dir
Contributor
Author
There was a problem hiding this comment.
Yes. Made from optional and removed it here. Core now defaults to the project table’s primary worktree directory, then performs the same tracked-directory validation as an explicit from. The TUI still passes from explicitly when creating from the current managed worktree. Fixed in 659e6c7.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Architecture
worktree/git.tsand shared canonical directory validation inworktree/directory.tsStorage
worktreetable for project roots and managed worktreesproject_directoryrow without deleting the old tablegit_worktreetype and strategy values to thegitstrategyProjectDirectoryTabledefinition for compatibilityAPI
GET,POST, andDELETE /api/experimental/project/:projectID/worktreePOST /api/experimental/project/:projectID/worktree/refreshclient.worktree.list/create/remove/refreshfor Promise and Effect clientsVerification
packages/opencode