Open
Conversation
|
@DevDesai444 is attempting to deploy a commit to the General Action Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR adds configurable worktree base paths on a per-project basis. Users can now choose where Emdash creates worktrees: default ( Key changes:
Issues found:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| src/main/services/ProjectSettingsService.ts | Core logic for resolving and validating worktree paths; includes safety checks but missing temp path constant handling |
| src/main/services/DatabaseService.ts | Refactored to support updating multiple project settings atomically |
| src/main/services/WorktreeService.ts | Updated to use configured base path; added allowAnyPath flag for cleanup safety |
| src/main/services/WorktreePoolService.ts | Updated reserve/pool logic to respect configured base paths and scan all project paths for orphans |
| src/renderer/components/WorktreeBasePathControls.tsx | New UI component for worktree location selection; hardcodes /tmp/emdash which won't work on Windows |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User selects worktree location in UI] --> B{Which mode?}
B -->|Default| C[Set to null]
B -->|Inside project| D[Set to '.worktrees']
B -->|Temporary| E[Set to '/tmp/emdash']
B -->|Custom| F[User picks directory]
C --> G[IPC: updateProjectSettings]
D --> G
E --> G
F --> G
G --> H[ProjectSettingsService.updateProjectSettings]
H --> I[normalizeWorktreeBasePathInput]
I --> J{Validation}
J -->|Invalid: project root| K[Throw error]
J -->|Invalid: inside .git| K
J -->|Valid| L[DatabaseService.updateProjectSettings]
L --> M[Update projects table]
M --> N[Return updated settings]
O[Task creation] --> P[ProjectSettingsService.resolveProjectWorktreeBasePath]
P --> Q[resolveWorktreeBasePath]
Q --> R{Path type?}
R -->|null/empty| S[Return ../worktrees]
R -->|'.worktrees'| T[Return project/.worktrees]
R -->|absolute| U[Return as-is]
R -->|relative| V[Resolve from project]
S --> W[WorktreeService creates worktree]
T --> W
U --> W
V --> W
Last reviewed commit: 9d7c91e
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.
PR: Feat_#947
Branch:
feat-configurable-worktree-storage-#947Resolves: [feat]: Configurable Worktree Storage Location #947
Basic Description
In this PR, I added support for configuring where Emdash creates worktrees on a per-project basis, instead of always using
../worktrees.What I did
worktree_base_path.../worktrees).worktrees)/tmp/emdash)Verification