Skip to content

itemsync: Fix GUI freeze when removing all items and on startup#3629

Open
hluk wants to merge 1 commit into
masterfrom
fix-sync-stuck
Open

itemsync: Fix GUI freeze when removing all items and on startup#3629
hluk wants to merge 1 commit into
masterfrom
fix-sync-stuck

Conversation

@hluk
Copy link
Copy Markdown
Owner

@hluk hluk commented Jun 5, 2026

Batch the duplicate-baseName check when removing items so the model is scanned once instead of once per removed row, reducing O(N²) to O(N+M).

Skip file-open retries (with sleep) for read-only operations; transient failures are handled by the file watcher on the next cycle. This prevents accumulated sleep time from freezing the UI on startup after a crash.

Always log a warning when a sync file cannot be opened for reading.

Assisted-by: Claude (Anthropic)

@hluk hluk force-pushed the fix-sync-stuck branch from 8b0a6b4 to 4ea2e2d Compare June 5, 2026 07:23
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 86.84211% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.32%. Comparing base (ef6e5db) to head (a4411a6).

Files with missing lines Patch % Lines
plugins/itemsync/filewatcher.cpp 86.84% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3629      +/-   ##
==========================================
- Coverage   74.43%   74.32%   -0.12%     
==========================================
  Files         253      253              
  Lines       37916    37947      +31     
  Branches     5120     5124       +4     
==========================================
- Hits        28222    28203      -19     
- Misses       9694     9744      +50     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Batch the duplicate-baseName check when removing items so the model is
scanned once instead of once per removed row, reducing O(N²) to O(N+M).

Skip file-open retries (with sleep) for read-only operations; transient
failures are handled by the file watcher on the next cycle. This prevents
accumulated sleep time from freezing the UI on startup after a crash.

Log a warning when a sync file exists but cannot be opened for reading;
use debug level when the file was simply deleted (normal sync operation).

Assisted-by: Claude (Anthropic)
@hluk hluk force-pushed the fix-sync-stuck branch from 4ea2e2d to a4411a6 Compare June 5, 2026 08:24
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