Repository navigation
Conversation
📝 WalkthroughWalkthroughAdds 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/ipc/find-listed-worktree-by-path.test.ts (1)
52-70: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover stale listed-path resolution failures.
This only tests failure resolving
requestedPath; add a case where the first listed path throws and a later canonical-path row still matches. That protects the per-row continuation behavior in the helper.Suggested test
+ it('continues when a listed worktree path cannot be resolved', async () => { + const matching = { path: '/var/home/user/ws/repo/feature' } + const resolveRealPath = vi.fn(async (pathValue: string) => { + if (pathValue === '/stale/worktree') throw new Error('ENOENT') + return pathValue.replace(/^\/home\//, '/var/home/') + }) + + await expect( + findListedWorktreeByPath( + [{ path: '/stale/worktree' }, matching], + '/home/user/ws/repo/feature', + { platform: 'linux', resolveRealPath } + ) + ).resolves.toBe(matching) + })
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 80ebe7e4-502e-4c19-a1ba-8209f937d78b
📥 Commits
Reviewing files that changed from the base of the PR and between 8a23618 and 8a2d719660c35e9eb27112e559ec15fec8bcf28a.
📒 Files selected for processing (5)
src/main/ipc/find-listed-worktree-by-path.test.tssrc/main/ipc/worktree-logic.tssrc/main/ipc/worktree-path-comparison.tssrc/main/ipc/worktree-remote.tssrc/main/runtime/orca-runtime.ts
8a2d719 to
981653f
Compare
On immutable Linux, /home is often a symlink to /var/home. git worktree list reports the realpath while Orca still holds the /home request path, so creation failed with "Worktree created but not found in listing". After local worktree add, fall back to realpath when string comparison misses. Keep WSL listings on string comparison only (host realpath is not authoritative there). Closes stablyai#10170
|
Closing as superseded — the linked issue(s) for this PR were fixed by another change that has already been merged.
Superseding merge: #10266 Thank you for the contribution! If anything remains unaddressed, please open a new issue or PR against current |
Summary
/homeis a symlink to/var/home.git worktree addwith a/home/...path succeeds, butgit worktree listreturns the canonical/var/home/...path.Fixes #10170
Test plan
/home→/var/homesymlink resolve matches listingresolveSymlinks: falseskips realpath (WSL)/home/$USER, create worktree → registers in UIELI5
On systems where /home is a symlink (e.g. Bazzite), created worktrees existed but Orca said not found because list paths differed. Matching now falls back to realpath so symlink roots resolve correctly.