Skip to content

feat(ui): run worktree deletion in background with spinner animation - #8

Merged
tosaka07 merged 1 commit into
mainfrom
fix/deletion
Feb 13, 2026
Merged

feat(ui): run worktree deletion in background with spinner animation#8
tosaka07 merged 1 commit into
mainfrom
fix/deletion

Conversation

@tosaka07

@tosaka07 tosaka07 commented Feb 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • ワークツリー削除処理を std::thread::spawn + mpsc::channel でバックグラウンド化し、削除中の UI フリーズを解消
  • イベントループを event::poll() 方式に変更し、削除中もスピナーアニメーション付きダイアログを表示
  • 確認ダイアログのショートカット表記を他モード (Normal, Create, Help) と同じ Span + 色分け方式に統一
  • 確認ダイアログで app.worktrees の代わりに app.filtered_worktrees を参照するバグを修正

Test plan

  • cargo test — 全 233 ユニットテスト + 6 統合テスト pass
  • cargo clippy -- -D warnings — warning なし
  • cargo fmt --all --check — フォーマット OK
  • 手動テスト: WT 選択 → Ctrl+D → 確認ダイアログの色が統一されていることを確認
  • 手動テスト: y/Y で削除 → スピナー表示が出て画面がフリーズしないことを確認
  • 手動テスト: Shift+D → Prune 確認 → 複数 WT 削除中も画面が応答することを確認

@tosaka07 tosaka07 added the enhancement New feature or request label Feb 13, 2026
…d confirm dialog

- Move delete operations to background threads via std::thread::spawn + mpsc::channel
  to prevent UI freezing during worktree removal
- Change event loop from blocking event::read() to event::poll() for responsive
  updates during deletion
- Add braille spinner animation in Deleting mode dialog
- Unify confirm dialog shortcut styling with Span-based colors matching other modes
- Fix confirm dialog using wrong worktree list (worktrees -> filtered_worktrees)
@tosaka07
tosaka07 marked this pull request as ready for review February 13, 2026 05:27
@tosaka07
tosaka07 merged commit 96c81c9 into main Feb 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant