From 60ee0e1f9c44ed6112f51aea5d88d881a1381fd7 Mon Sep 17 00:00:00 2001 From: Tw93 Date: Fri, 16 Jan 2026 10:26:46 +0800 Subject: [PATCH] feat(uninstall): add progress spinner for brew autoremove - Show 'Checking brew dependencies...' spinner while running brew autoremove - Prevents user confusion when brew cleanup takes time after uninstall - Improves UX by providing visual feedback during dependency cleanup --- lib/uninstall/batch.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/uninstall/batch.sh b/lib/uninstall/batch.sh index 843af7f..c57a27f 100755 --- a/lib/uninstall/batch.sh +++ b/lib/uninstall/batch.sh @@ -572,10 +572,20 @@ batch_uninstall_applications() { # Auto-run brew autoremove if Homebrew casks were uninstalled if [[ $brew_apps_removed -gt 0 ]]; then + # Show spinner while checking for orphaned dependencies + if [[ -t 1 ]]; then + start_inline_spinner "Checking brew dependencies..." + fi + local autoremove_output removed_count autoremove_output=$(HOMEBREW_NO_ENV_HINTS=1 brew autoremove 2> /dev/null) || true removed_count=$(printf '%s\n' "$autoremove_output" | grep -c "^Uninstalling" || true) removed_count=${removed_count:-0} + + if [[ -t 1 ]]; then + stop_inline_spinner + fi + if [[ $removed_count -gt 0 ]]; then echo -e "${GREEN}${ICON_SUCCESS}${NC} Cleaned $removed_count orphaned brew dependencies" echo ""