Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ if ! command -v git &> /dev/null || ! command -v python3 &> /dev/null; then
exit 1
fi

# 2. Update/Clone
# 2. Clean Install
echo -e "${BLUE}[+] Fetching latest version...${NC}"
mkdir -p "$INSTALL_DIR"
if [ -d "$INSTALL_DIR/.git" ]; then
cd "$INSTALL_DIR" && git pull -q
else
git clone -q -b "$BRANCH" "$REPO_URL" "$INSTALL_DIR"
if [ -d "$INSTALL_DIR" ]; then
rm -rf "$INSTALL_DIR"
fi
git clone -q -b "$BRANCH" "$REPO_URL" "$INSTALL_DIR"

# 3. Setup Python Environment (Quietly)
echo -e "${BLUE}[+] Preparing environment...${NC}"
Expand Down
7 changes: 5 additions & 2 deletions src/bleach/tui/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import asyncio

from textual.app import App, ComposeResult
from textual.containers import Container, VerticalScroll
from textual.widgets import (
Expand Down Expand Up @@ -252,10 +254,11 @@ async def _perform_cleanup(self, cleaners: list[Cleaner], log: RichLog) -> None:
total = len(cleaners)
total_freed_mb = 0.0

loop = asyncio.get_running_loop()
for cleaner in cleaners:
log.write(f"Running: [bold cyan]{cleaner.name}[/]...")
# Yield control to UI loop
result = cleaner.clean()
# Run blocking I/O in a separate thread to keep UI responsive
result = await loop.run_in_executor(None, cleaner.clean)

if result.success:
msg = f" [green]✔ OK[/]: {result.message}"
Expand Down