Skip to content

fix(vscode): make worktree deletion feel complete - #13869

Merged
marius-kilocode merged 5 commits into
mainfrom
improve-safe-worktree-deletion
Sep 7, 2026
Merged

marius-kilocode merged 5 commits into
mainfrom
improve-safe-worktree-deletion

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Worktree deletion should feel like finishing a task while remaining deliberate and safe. The old inline confirmation also had a safety bug: after the first trash click, clicking the worktree card could invoke deletion instead of opening the session.

Why This Change Was Made

  • Keep the compact trash to Delete? interaction instead of adding a large finish control.
  • Confirm deletion only from the explicit confirmation button. Card navigation cancels a pending confirmation.
  • Show the completion animation only after the extension confirms that the worktree was deleted.
  • Retain the card briefly with a checked box, strikethrough title, and collapse animation, then remove it.
  • Preserve the agent activity spinner and ready checkmark as separate status indicators.
  • Handle state and deletion-event ordering races, including legacy single-project mode.
  • Use named deletion message types and keep the completion announcement localized across all Agent Manager locales.

User Impact

Users get a compact, safe delete interaction and a clear completion moment. Cancelled or failed deletion does not show success. Reduced-motion settings shorten the animation without removing the completion feedback.

Evidence

  • Full extension unit suite: 4,982 passing, 1 skipped, 0 failed.
  • bun run compile passed.
  • bun run knip passed.
  • bun run check-kilocode-change passed.
  • Manual VS Code verification covered confirmation, successful deletion, completion collapse, and the published GIF below.

Deleting a worktree with a safe confirmation and completion animation

Comment thread packages/kilo-vscode/webview-ui/agent-manager/worktree-completion.ts Outdated
Comment thread packages/kilo-vscode/webview-ui/agent-manager/WorktreeItem.tsx
@kilo-code-bot

kilo-code-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/WorktreeItem.tsx 232 Completion wrapper also collapses the multi-version group header
Files Reviewed (15 files)
  • .changeset/tidy-worktree-finish.md
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/worktree-item-grouped-chromium-linux.png
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/worktree-item-pending-delete-chromium-linux.png
  • packages/kilo-vscode/src/agent-manager/provider-lifecycle.ts
  • packages/kilo-vscode/src/agent-manager/types.ts
  • packages/kilo-vscode/tests/fixtures/worktree-finish.tsx
  • packages/kilo-vscode/tests/unit/agent-manager-provider-lifecycle.test.ts
  • packages/kilo-vscode/tests/unit/worktree-finish.test.ts
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/ProjectSidebarBody.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/SidebarBody.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/WorktreeItem.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css
  • packages/kilo-vscode/webview-ui/agent-manager/worktree-completion.ts
  • packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts

Fix these issues in Kilo Cloud

Previous Review Summary (commit e7c8dfc)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit e7c8dfc)

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 1
Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/worktree-completion.ts 29 source().at(-1) can retain the wrong worktree when state arrives first

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/agent-manager/WorktreeItem.tsx 232 Completion wrapper also collapses the multi-version group header
Files Reviewed (36 files)
  • .changeset/tidy-worktree-finish.md
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/worktree-item-grouped-chromium-linux.png
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/agentmanager/worktree-item-pending-delete-chromium-linux.png
  • packages/kilo-vscode/src/agent-manager/provider-lifecycle.ts
  • packages/kilo-vscode/src/agent-manager/types.ts
  • packages/kilo-vscode/tests/fixtures/worktree-finish.tsx
  • packages/kilo-vscode/tests/unit/agent-manager-provider-lifecycle.test.ts
  • packages/kilo-vscode/tests/unit/worktree-finish.test.ts
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/ProjectSidebarBody.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/SidebarBody.tsx
  • packages/kilo-vscode/webview-ui/agent-manager/WorktreeItem.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/agent-manager/agent-manager.css
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/ar.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/br.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/bs.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/da.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/de.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/en.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/es.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/fa.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/fr.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/it.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/ja.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/ko.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/nl.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/no.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/pl.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/ru.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/th.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/tr.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/uk.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/zh.ts
  • packages/kilo-vscode/webview-ui/agent-manager/i18n/zht.ts
  • packages/kilo-vscode/webview-ui/agent-manager/worktree-completion.ts - 1 issue
  • packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts

Fix these issues in Kilo Cloud


Reviewed by grok-4.6 · Input: 119.8K · Output: 13.7K · Cached: 516.6K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 5e41fd3 into main Sep 7, 2026
27 of 28 checks passed
@marius-kilocode
marius-kilocode deleted the improve-safe-worktree-deletion branch September 7, 2026 12:30
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.

2 participants