From fbff0ec3bdb66c1fd6140dbaddb555f2652ae10c Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sat, 24 Jan 2026 08:31:04 +0800 Subject: [PATCH] fix: show spinner during cleanup phase Add progress indicator when deleting files to prevent the terminal from appearing frozen during long-running cleanup operations. Closes #358 --- bin/clean.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/clean.sh b/bin/clean.sh index 90e3932..93262a3 100755 --- a/bin/clean.sh +++ b/bin/clean.sh @@ -522,6 +522,10 @@ safe_clean() { fi # Read results back in original order. + # Start spinner for cleaning phase + if [[ "$DRY_RUN" != "true" && ${#existing_paths[@]} -gt 0 && -t 1 ]]; then + MOLE_SPINNER_PREFIX=" " start_inline_spinner "Cleaning..." + fi idx=0 if [[ ${#existing_paths[@]} -gt 0 ]]; then for path in "${existing_paths[@]}"; do @@ -558,6 +562,10 @@ safe_clean() { fi else + # Start spinner for cleaning phase (small batch) + if [[ "$DRY_RUN" != "true" && ${#existing_paths[@]} -gt 0 && -t 1 ]]; then + MOLE_SPINNER_PREFIX=" " start_inline_spinner "Cleaning..." + fi local idx=0 if [[ ${#existing_paths[@]} -gt 0 ]]; then for path in "${existing_paths[@]}"; do