Repository navigation
Fix Windows workspace deletion runtime resolution - #5888
Conversation
Co-authored-by: Orca <help@stably.ai>
Resolve project-created workspace deletion through the selected project runtime so Windows paths are listed strictly without falsely tripping the unregistered worktree guard. Design doc: docs/delete-workspace-windows-unregistered.md
|
Ready to review this PR? Stage has broken it down into 7 individual chapters for you: Chapters generated by Stage for commit b6c67e8 on Jun 20, 2026 8:04am UTC. |
📝 WalkthroughWalkthroughA new 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
Warning Tools execution failed with the following error: Failed to run tools: 8 RESOURCE_EXHAUSTED: Received message larger than max (322118034 vs 209715200) 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/main/runtime/orca-runtime.ts (1)
13931-13935: ⚡ Quick winAdd a short “why” comment for the strict local listing branch.
This runtime-specific strict listing is the key Windows/WSL path-spelling invariant; make that explicit so it is not “simplified” back to runtime-agnostic listing later.
Proposed comment
+ // Why: delete-time validation must list through the selected local runtime so + // Windows/WSL path spelling matches the canonical worktree row used by the guard. const registeredWorktrees = repo.connectionId ? await provider!.listWorktrees(repo.path) : hasLocalWorktreeGitOptions ? await listWorktreesStrict(repo.path, localWorktreeGitOptions) : await listWorktreesStrict(repo.path)As per coding guidelines, “When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does.”
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d4b83f2d-8443-4d06-94cc-9ce66c14f919
📒 Files selected for processing (19)
docs/delete-workspace-windows-unregistered.mdsrc/main/browser/cdp-bridge-integration.test.tssrc/main/git/worktree.tssrc/main/ipc/filesystem.test.tssrc/main/ipc/worktrees-windows.test.tssrc/main/ipc/worktrees.test.tssrc/main/ipc/worktrees.tssrc/main/runtime/fit-override-integration.test.tssrc/main/runtime/mobile-presence-lock.test.tssrc/main/runtime/mobile-subscribe-integration.test.tssrc/main/runtime/orca-runtime.test.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/runtime-rpc.test.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsontest test.txt
| export async function listWorktreesStrict( | ||
| repoPath: string, | ||
| options: GitWorktreeExecOptions = {} | ||
| ): Promise<GitWorktreeInfo[]> { | ||
| const worktrees = (await readWorktreeList(repoPath, options)).map((worktree) => { | ||
| const translatedPath = translateWorktreePath(worktree.path, repoPath, options) | ||
| return translatedPath === worktree.path ? worktree : { ...worktree, path: translatedPath } | ||
| }) | ||
| return annotateSparseCheckoutStatus(worktrees) | ||
| } |
There was a problem hiding this comment.
Add a short “Why” comment for strict error propagation (Line 495).
listWorktreesStrict is design-driven and intentionally differs from listWorktrees by surfacing failures; please add a 1–2 line comment stating that reason so future changes don’t reintroduce silent fallback behavior.
Source: Coding guidelines
* Add test file for workspace delete bug Co-authored-by: Orca <help@stably.ai> * Fix Windows workspace deletion runtime resolution Resolve project-created workspace deletion through the selected project runtime so Windows paths are listed strictly without falsely tripping the unregistered worktree guard. Design doc: docs/delete-workspace-windows-unregistered.md --------- Co-authored-by: Orca <help@stably.ai>
Summary
knownRemovedWorktreefor the expected removal path and extend coverage across Windows path spelling, runtime selection, delete guards, and related integration tests.Design Doc
docs/delete-workspace-windows-unregistered.mdValidation
validation-screenshots/and are intentionally uncommitted.Residual Risk