Skip to content

fix: make repo and project deletion async to prevent UI freezing#216

Merged
matt2e merged 1 commit intomainfrom
async-delete-repo
Feb 19, 2026
Merged

fix: make repo and project deletion async to prevent UI freezing#216
matt2e merged 1 commit intomainfrom
async-delete-repo

Conversation

@matt2e
Copy link
Contributor

@matt2e matt2e commented Feb 19, 2026

Move heavy cleanup operations (worktree removal, remote workspace deletion, directory cleanup) in remove_project_repo and delete_project to spawn_blocking tasks so the UI thread stays responsive when deleting large repos or projects with many branches.

Move heavy I/O work (worktree removal, remote workspace deletion,
directory cleanup) off the main thread using spawn_blocking in both
remove_project_repo and delete_project Tauri commands.

- Convert remove_project_repo from sync fn to async fn, wrapping
  cleanup_branch_resources calls in spawn_blocking
- Wrap delete_project's cleanup_branch_resources_best_effort loop and
  filesystem cleanup in spawn_blocking (was async but still blocking)
- Frontend already has spinner UI in place: BranchCard shows a
  'Deleting...' overlay via deletingBranches state, and project
  deletion uses deletingProjectNames with toast notifications

Follows the same pattern used by delete_branch in branches.rs.
@matt2e matt2e merged commit acca689 into main Feb 19, 2026
3 checks passed
@matt2e matt2e deleted the async-delete-repo branch February 19, 2026 19:24
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

Comments