Skip to content

fix: set status to idle before finalization on "Nothing to do" path#7

Merged
chodeus merged 2 commits intomainfrom
claude/fix-scanning-logs-issue-Sx11K
Apr 15, 2026
Merged

fix: set status to idle before finalization on "Nothing to do" path#7
chodeus merged 2 commits intomainfrom
claude/fix-scanning-logs-issue-Sx11K

Conversation

@chodeus
Copy link
Copy Markdown
Owner

@chodeus chodeus commented Apr 15, 2026

Summary

  • When all files are already processed (total == 0), the UI status remained stuck on "Scanning" because the early-return path called _finalize_scan() without first setting status to "idle". Since _finalize_scan() resolves Lidarr IDs for existing corrupt files via HTTP requests, this could block for several minutes with the yellow dot still spinning.
  • Added the same status="idle" update that already exists on the normal scan completion path (line 773) to the "Nothing to do" early-return path, so the status dot turns green immediately.

Test plan

  • Start BeatsCheck with all files already processed (so total == 0)
  • Verify logs show "Nothing to do." and the status indicator switches to "Idle" immediately (not stuck on "Scanning")
  • Confirm Lidarr ID resolution still completes in the background without errors
  • Run a normal scan with new files and verify status transitions (Scanning → Idle) still work correctly

https://claude.ai/code/session_01TiRDfaCYdz46ofc1SwTg8v

claude added 2 commits April 15, 2026 05:11
When all files are already processed (total == 0), the scan takes an
early return through _finalize_scan() without first updating the UI
status to "idle". Because _finalize_scan() can spend minutes resolving
Lidarr IDs for existing corrupt files, the UI keeps showing "Scanning"
long after logs say "Nothing to do."

Mirror the idle update already present on the normal scan completion
path (line 773) so the status dot turns green immediately.

https://claude.ai/code/session_01TiRDfaCYdz46ofc1SwTg8v
Extracting the "Nothing to do" early-return block into its own helper
brings _run_scan_inner back under the max-complexity=25 threshold.

https://claude.ai/code/session_01TiRDfaCYdz46ofc1SwTg8v
@chodeus chodeus merged commit 1bcd58a into main Apr 15, 2026
4 checks passed
@chodeus chodeus deleted the claude/fix-scanning-logs-issue-Sx11K branch April 15, 2026 07:00
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.

2 participants