Fix discovery phase appearing frozen
Scanner now updates message every 250 files during os.walk so the UI shows a live count. Progress bar switches to an indeterminate animated pulse during discovery and takeout phases (no known total yet), then reverts to a normal percentage bar once indexing begins. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -492,6 +492,12 @@ def run_scan(folder_path: str, scan_id: int, mode: str = "incremental"):
|
||||
ext = Path(fname).suffix.lower()
|
||||
if ext in SUPPORTED_EXT:
|
||||
all_files.append(os.path.join(root, fname))
|
||||
# Live count update every 250 files so UI doesn't look frozen
|
||||
if len(all_files) % 250 == 0:
|
||||
scan_state["message"] = f"Discovering... {len(all_files):,} files found"
|
||||
|
||||
if scan_state["cancel_requested"]:
|
||||
break
|
||||
|
||||
scan_state["total"] = len(all_files)
|
||||
scan_state["message"] = f"Found {len(all_files):,} files"
|
||||
|
||||
Reference in New Issue
Block a user