Repository navigation
Conversation
Warn about submodule files and unpublished commits before the user retries Git's refusal. Preserve the non-force safety checks on local and SSH hosts. Co-authored-by: soichisumi <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 18 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (9)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (14)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe worktree removal classifier now recognizes Git refusals involving initialized submodules as a force-delete reason. The renderer displays translated warnings that advise backing up submodule files and publishing local commits before force deletion. Tests cover error classification, warning copy, and the force-delete interaction. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to Deleting a workspace with initialized submodules now shows a clear warning and an explicit Force Delete option. No merge-blocking risk was found. Live SSH and Linux/Windows UI behavior were not exercised. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 8 files. (6 skipped: 6 unsupported.) ✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
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 |
|
Worktrees with submodules seem like there is no way to remove now them after #24602 was merged, besides using the orca cli to remove it. If I do understand this correctly, then this fix is (to me personally :D) very important. |
|
+1 on this. It looks like this was supported previously #9096 but as @maxsumrall points out, #24602 (perhaps inadvertantly?) removed it |
|
Closing as fully superseded by merged #28878 ( Every core behavior is present: #28878 also removed automatic force retry and has a real-Git regression with a local-only submodule commit: ordinary removal refuses and preserves registration/history, while explicit force succeeds. Its extra dirty-submodule detection broadens the warning beyond this proposal rather than leaving a missing core. The tests and extracted warning helper proposed here support those same behaviors and add no independent product change. No part of this PR still needs merging. This was a source/test comparison; I did not run tests or an app during the audit. |
ELI5
When Git refuses to delete a workspace containing initialized submodules, Orca now explains why and offers Force Delete. The warning states: “Force Delete may permanently discard submodule files and unpublished commits.”
What Changed
Why
Follow-up to #7354. A parent worktree can report clean even when a submodule contains unpublished commits. Automatically retrying with
--forceafter checking parent status can discard those commits. This change preserves the local and SSH non-force refusal and lets the user make an informed, explicit retry through the existing force action.Thanks to @soichisumi for identifying the issue and the original recovery work in #7354. Credited as co-author on the commit.
Visual Proof
Isolated renderer component previews using the actual toast component and app styles. The before preview uses the previous unclassified refusal state; the after preview uses the new classifier and warning.
Before:

After:

Testing
pnpm lintpasses, including localization checks.pnpm typecheckandpnpm buildare blocked by an existing TS2741 error instructured-agent-session-codex-stopped-send-order.test.ts:170: missingresolveLaunchArgsin runtime test dependencies. This file is unchanged by this PR.Review
No automatic force retry or deletion backend changes. Uses the existing host-qualified force action; Git locks continue to require explicit unlocking. Current local and relay Git executors already pin untranslated output for stderr classification. No new dependencies or Git-provider assumptions.
Agent skill upstream boundary
Checklist