Repository navigation
feat(web): reuse existing worktrees - #8517
CasperEngl wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
One consistency finding on the workspace control migration from Select to Menu. Details inline.
Posted via Macroscope — UI Consistency
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This XL PR introduces a new cross-layer workflow for selecting and reusing arbitrary Git worktrees, including new UI, RPC, contracts, filesystem/path handling, and auth wiring. The scope and workspace-selection risks—including path aliases and ambiguous detached-worktree labels—make the runtime impact unsuitable for automatic approval. Not approved because:
Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
One finding: the workspace picker migration from Select to Menu drops the explicit non-modal behavior of the control it replaces.
Posted via Macroscope — UI Consistency
There was a problem hiding this comment.
One finding on the workspace trigger migration from SelectTrigger to MenuTrigger/Button: descendant icon tone no longer tracks the label on hover/open, which diverges from the adjacent environment selector in the same composer strip.
Posted via Macroscope — UI Consistency
e5d926f to
b7757b4
Compare
| ); | ||
|
|
||
| export function vcsWorktreeLabel(worktree: Pick<VcsWorktree, "branch" | "head">): string { | ||
| return worktree.branch ?? `Detached at ${worktree.head.slice(0, 7)}`; |
There was a problem hiding this comment.
🟡 Medium state/vcs.ts:46
Detached worktrees that share the same head are rendered with the identical Detached at <sha> label, so the picker cannot distinguish them and may attach a draft to the wrong workspace. Include a distinguishing worktree path or other unique identifier in the detached label.
🤖 Copy this AI Prompt to have your agent fix this:
In file @packages/client-runtime/src/state/vcs.ts around line 46:
Detached worktrees that share the same `head` are rendered with the identical `Detached at <sha>` label, so the picker cannot distinguish them and may attach a draft to the wrong workspace. Include a distinguishing worktree path or other unique identifier in the detached label.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b7757b4. Configure here.
| ), | ||
| isRepo: true, | ||
| }; | ||
| }); |
There was a problem hiding this comment.
Worktree exclusion misses path aliases
Medium Severity
listWorktrees compares the current checkout with realPath(cwd) against listed paths that only go through path.resolve/normalize, which do not follow symlinks. Alias pairs such as /var vs /private/var can therefore fail the inequality check, so the current checkout still appears as a reusable worktree. Picking it stores that path with envMode worktree and can make the later worktree-add fail because the directory is already a checkout.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit b7757b4. Configure here.
|
Note: GPT-5 on behalf of shivam (@shivamhwp). Thanks for the contribution. We're closing #8517 and #8568 because we're keeping the existing selection flow. Users can already reuse worktrees through the branch selector, and web/desktop also provides a Previous worktree shortcut. The dedicated picker adds another UI path for largely the same workflow. We recognize that it also exposes detached worktrees, but don't see enough benefit to add a separate picker across clients right now. |


What Changed
Why
Stack
UI Changes
Before

After

Checklist
Implemented with GPT-5.6 Sol through the Codex harness in T3 Code.