Skip to content

Keep scan progress visible through preparation and finalization - #44

Draft
huntharo wants to merge 2 commits into
mainfrom
fix/rescan-progress-panel
Draft

huntharo wants to merge 2 commits into
mainfrom
fix/rescan-progress-panel

Conversation

@huntharo

@huntharo huntharo commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

After clicking Rescan, Overview showed only a static-looking icon while the prior scan's index loaded with zero files counted. Its progress bar required a numeric percentage, so it also disappeared during finalization. Once file tiles appeared, the central progress presentation disappeared entirely.

Reuse the existing loading panel throughout the scan, with a compact layout above the treemap once results arrive. Preparation, metadata loading, and finalization show an animated indeterminate indicator without a percentage. Walking and indexing use the same available percentage as the header and drive indicator. Phase text, counts, elapsed time, and the existing Stop button remain available. The panel disappears on completion or cancellation.

The JavaScript worker previously inherited scanPhase: "starting" for every snapshot. It now explicitly reports walking after baseline loading, finalizing before flushing its output, and complete on completion. This preserves byte-based walking progress and prevents active JS scans from remaining labeled as preparation.

Before / after

Matching captures of the base renderer (27c35dd) and PR renderer (e77a59c) in Electron on macOS at 1280 × 800. Both receive identical injected scan snapshots; file counts, sizes, and elapsed times are fixtures. No full-disk scan was run. Click an image to view it at full size.

Scan state Before After
Preparation at 20.5 s: zero files, no known percentage Before: Preparation at 20.5 s: zero files, no known percentage After: Preparation at 20.5 s: zero files, no known percentage
Indexing at 45 s: 60% with file tiles Before: Indexing at 45 s: 60% with file tiles After: Indexing at 45 s: 60% with file tiles
Finalization at 55 s: progress becomes indeterminate Before: Finalization at 55 s: progress becomes indeterminate After: Finalization at 55 s: progress becomes indeterminate

Validated on macOS:

  • Three Electron progress tests cover zero-file preparation, advancing elapsed time, Stop, metadata loading, walking, count-based indexing, and indeterminate finalization with and without tiles. One runs the real JS scan function on the small fixture and replays its unchanged snapshots through renderer IPC for both a first scan and a baseline rescan.
  • Both existing folder-scan and restart tests pass against the native scanner using the small test fixture: five Electron tests passed in total.
  • All 82 scan-worker and renderer unit tests pass after rebasing onto main, including a first-scan/rescan phase regression, existing I/O budgets, and operation-count scaling tests.
  • bun run typecheck and renderer/Electron builds pass. The native build also passed during initial validation.
  • Reviewed screenshots of preparation, indexing, and finalization, including the compact panel at 960 × 720.

The separate missing-native-scanner fallback and reported out-of-memory failure remain unresolved. No new disk writes or per-file/per-folder traversal are introduced.

@huntharo
huntharo force-pushed the fix/rescan-progress-panel branch from d6a9841 to e77a59c Compare September 27, 2026 03:21
@huntharo
huntharo marked this pull request as draft September 27, 2026 03:41
huntharo pushed a commit that referenced this pull request Sep 27, 2026
Restore parallel deletes while retaining progress
@huntharo
huntharo force-pushed the fix/rescan-progress-panel branch from e77a59c to 0bb5dc1 Compare October 14, 2026 16:18
@huntharo
huntharo force-pushed the fix/rescan-progress-panel branch from 0bb5dc1 to cb94981 Compare October 22, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant