Repository navigation
Choose the worktree location; solenta.json onSettle (#1531) - #1544
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c79814d86
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const entry of entries) { | ||
| if (!entry.isDirectory()) continue; | ||
| const dir = path.join(root.dir, entry.name); | ||
| if (!root.owned) { |
There was a problem hiding this comment.
Prevent GC from deleting a nested custom root
When worktreeRoot is a child of the default worktreeBase (for example, <userData>/worktrees/custom), this loop first encounters custom through the app-owned root and adds the directory itself without applying the external-root filters. sweepOrphanWorktrees then sees that container as an unreferenced, non-Git directory and recursively force-removes it, deleting every active worktree stored beneath it, including uncommitted files. Reject nested custom roots or skip configured root directories while enumerating the owned base.
Useful? React with 👍 / 👎.
Adds settings.worktreeRoot (Threads pane, "Worktree location"): an absolute, writable folder for new local worktrees; empty keeps the default userData/worktrees. Existing threads keep their stored worktreePath. An unavailable root falls back to the default. GC (orphan sweep, gcScan, retention) now enumerates the default root, the chosen root, the WSL roots resolveWorktreeDir uses (#1401) and the parent of every stored worktreePath. Only the default root is app-owned. In the others GC only considers dirs named like a thread id that are registered linked worktrees of a known project (main checkouts excluded), and never force-removes a dir git cannot read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tles (#1531) `onSettle` in solenta.json is a command string or the name of one of the files
9c79814 to
844b78b
Compare
…L) roots (#1401) (#1623) The WSL root enumeration landed with #1544. Pin the issue's check on the non-owned root path WSL roots share: clean past keep-N is reclaimed, dirty and working are kept. Co-authored-by: Willem <willem@willems-mbp.home> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Part of #1531 (and #1401 for the WSL roots).
Worktree location (Settings → Threads,
worktreeRoot)userData/worktrees. Otherwise the value must be an absolute, writable directory, which is checked when you save.worktreePaththey were created with.GC now covers every root: the default root, the configured root, the WSL roots from
resolveWorktreeDir, and the parent folder of every storedworktreePath.userData/worktreesis treated as app-owned, so cleanup works there exactly as before.git worktree listregisters it as a worktree of a known project. Project main checkouts are never candidates.onSettlein solenta.json: either a command string or the name of one of the file'squickActions.thread_settleor by auto-settle. It has a 2 min timeout, and the settle never waits on it or fails because of it.onSettlechanges the config hash, so the file needs approval again.Verification (my runs on this branch, not the worker's):
mermaidEngine.tserror that is already on main.Note: like #1537 and #1538, this PR adds a setting to
electron/test/budget-spend.test.js, so it needs a small rebase after those land.🤖 Generated with Claude Code