Skip to content

Run nested workspace deletion in the background - #25975

Merged
nwparker merged 4 commits into
mainfrom
nwparker/blocking-delete-dialog
Oct 6, 2026
Merged

nwparker merged 4 commits into
mainfrom
nwparker/blocking-delete-dialog

Conversation

@nwparker

@nwparker nwparker commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Deleting a workspace with nested worktrees now lets you keep using Orca while the deletion finishes.

What Changed

The nested-worktree recovery dialog closes immediately after confirmation, matching regular workspace deletes. Its toast button shows progress and prevents another submission while removal and refresh run. A test fixture also supplies the required empty launch arguments to repair a pre-existing Node typecheck failure. Failures appear in a toast; the original recovery button becomes available again and always fetches a fresh deletion plan.

Why

The confirmation had already collected the user's decision, but kept blocking the app until deletion finished. Moving the wait out of the dialog reuses the existing removal operation and workspace progress state while preserving child-first deletion, host routing, and the reviewed target list.

Linked Issue

Slack report

Visual Proof

Hidden macOS Electron renderer, same temporary repository and pending deletion. The preview uses real Git registrations; removal was held pending to capture both states, then completed through the real removal operation.

Before — the dialog stays open while deletion runs:

Before

After — the dialog closes and progress stays in the toast:

After

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

13 focused tests passed across the nested deletion dialog and failure toast tests, including pending deletion, returned failure, rejected removal, fresh review, cancellation, and success callbacks. pnpm tc:web, pnpm run check:code-quality:changed, focused oxlint, and both localization catalog and extraction checks passed. The failure toast reuses the existing translated workspace deletion title.

Verified through Playwright CDP on a hidden macOS Electron instance: the dialog closes while removal is pending, Settings remains accessible, and completing the real operation deletes both nested and parent worktrees. Git then lists only the primary checkout and the pending button disappears. The affected Codex session test also passed all 4 cases, and pnpm tc:node passed after incorporating the related fixture fix already on main. Linux, Windows, and live SSH were not exercised; execution and host routing are unchanged. CI covers the full suite and build.

Review

Self-reviewed the confirmation, pending state, failure recovery, refresh, and completion callbacks.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Runtime behavior is unchanged; the additional Codex test fixture line supplies a required dependency. Folder workspaces use the same recovery component. No new execution, Git commands, wire fields, platform assumptions, or provider-specific behavior.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 891b47c2-b969-4ab9-9b01-772630a31ea1
📥 Commits

Reviewing files that changed from the base of the PR and between 51062e6 and 6e7c6ef.

📒 Files selected for processing (3)
  • src/main/runtime/structured-agent-session-codex-stopped-send-order.test.ts
  • src/renderer/src/components/sidebar/DeleteNestedWorktreesDialog.test.tsx
  • src/renderer/src/components/sidebar/DeleteNestedWorktreesDialog.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The runtime test fixture now supplies an empty launch-arguments resolver, and the test suite covers transcript placement for sends withdrawn by Stop. The nested worktree deletion dialog closes when deletion starts, disables its trigger while deletion is pending, and reports failed results or rejected promises through error toasts. Tests cover pending deletion, success, and failure.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 6e7c6

Deletion can continue after the dialog closes, with failure feedback still available. No identified issue prevents merging after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the main change: nested workspace deletion runs in the background.
Description check ✅ Passed The description explains the user-facing change, rationale, implementation, visual proof, and reported tests. The linked item is a Slack report rather than an issue; the template requires an issue lin…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit 6352ff3 into main Oct 6, 2026
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant