fix: keep Duplicates workbench responsive on large directories (#94) #100

Merged
ValleyGeek merged 4 commits from 0.1.33/issue-94-dupe-workbench-slow-load into main 2026-06-19 03:40:36 +00:00
Member

Summary

  • Builds the Duplicates workbench tag list in batches, yielding to the event loop between batches, so the UI stays responsive and the list visibly populates instead of freezing for several seconds on workspaces with thousands of duplicate groups.
  • Keeps row spacing in the sidebar constant throughout population: every row uses a fixed height regardless of whether it shows a status indicator, and the scroll area's content widget is resized synchronously after each batch so rows don't visually overlap/spread apart while the list builds.
  • Bumps VERSION to 0.1.34 (PR-prep) and adds a CHANGELOG.md entry.

Note: this reduces the effect of #94 substantially (no more multi-second freeze; list populates progressively with stable spacing) but the issue is left open rather than auto-closed, in case further edge cases surface during review.

Test plan

  • ruff check . / ruff format --check .
  • pytest — full suite passes (a pre-existing, unrelated intermittent segfault in test_pr13_config.py::test_help_workbench_contents_link_scrolls was investigated and confirmed to reproduce identically on a clean, unmodified main checkout — not caused by this branch)
  • Dupe-specific test files run 20x consecutively with no failures
  • Added regression tests: batched population doesn't freeze, uniform row height, no row overlap during population

🤖 Generated with Claude Code

## Summary - Builds the Duplicates workbench tag list in batches, yielding to the event loop between batches, so the UI stays responsive and the list visibly populates instead of freezing for several seconds on workspaces with thousands of duplicate groups. - Keeps row spacing in the sidebar constant throughout population: every row uses a fixed height regardless of whether it shows a status indicator, and the scroll area's content widget is resized synchronously after each batch so rows don't visually overlap/spread apart while the list builds. - Bumps `VERSION` to `0.1.34` (PR-prep) and adds a `CHANGELOG.md` entry. **Note:** this reduces the effect of #94 substantially (no more multi-second freeze; list populates progressively with stable spacing) but the issue is left open rather than auto-closed, in case further edge cases surface during review. ## Test plan - [x] `ruff check .` / `ruff format --check .` - [x] `pytest` — full suite passes (a pre-existing, unrelated intermittent segfault in `test_pr13_config.py::test_help_workbench_contents_link_scrolls` was investigated and confirmed to reproduce identically on a clean, unmodified `main` checkout — not caused by this branch) - [x] Dupe-specific test files run 20x consecutively with no failures - [x] Added regression tests: batched population doesn't freeze, uniform row height, no row overlap during population 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: build Duplicates workbench tag list in batches (#94)
All checks were successful
CI / build-release (push) Successful in 10m35s
CI / release-linux (push) Successful in 0s
Windows Release / build-release (push) Successful in 9m6s
CI / build-release-1 (push) Successful in 10s
CI / release-windows (push) Successful in 0s
CI / lint (push) Successful in 8s
CI / test (push) Successful in 2m3s
Linux AppImage / build-release (push) Successful in 9m47s
c1f047d5a0
Rebuilding the dupe tag sidebar synchronously created one widget row
per F-DUPE_/V-DUPE_ tag in a single main-thread pass; with 2,000+
groups this froze the UI for several seconds. Rows are now built in
small batches across event-loop ticks (parented QTimer, cancelled by
a rebuild generation token), so the workbench stays responsive and
the list visibly populates instead of freezing. visible_tag_names()
now reflects the full filtered tag set immediately, independent of
how many row widgets have been built so far.

Threading notes: all widget construction stays on the main thread via
QTimer batching (no worker thread involved); the DB summary query
itself was already fast (~20ms for 2,000 tags), confirmed by profiling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: keep Duplicates workbench row spacing constant while populating
Some checks failed
Windows Release / build-release (push) Successful in 7m50s
Linux AppImage / build-release (push) Successful in 8m48s
CI / lint (push) Successful in 9s
CI / test (push) Successful in 2m6s
CI / build-release (push) Failing after 10s
CI / release-linux (push) Failing after 0s
CI / release-windows (push) Has been cancelled
CI / build-release-1 (push) Has been cancelled
55ca0d97c7
Tag rows in the dupe sidebar had no fixed height, so a row's actual
height depended on whether it carried a status indicator (✓/✗). As
the batched list populated (added in #94), newer batches mixed rows
with and without indicators, making the vertical spacing between
buttons look uneven and shift around. Both the row host and its main
button now use a fixed height (matching the existing trash-button and
tag-swatch height, TAG_HEIGHT), and the status indicator label is
always the same fixed size, so every row is identical in height and
the list's spacing stays static regardless of population progress or
status mix.

Threading notes: pure widget construction tweaks, no threading change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: stop Duplicates workbench rows overlapping while batch populating
Some checks failed
CI / lint (push) Successful in 7s
CI / test (push) Successful in 2m27s
Linux AppImage / build-release (push) Successful in 9m10s
CI / build-release (push) Successful in 10m35s
CI / release-linux (push) Successful in 0s
CI / release-windows (push) Has been cancelled
CI / build-release-1 (push) Has been cancelled
Windows Release / build-release (push) Has been cancelled
7e61045b84
The scroll area's content widget only grows to fit newly added rows on
a deferred LayoutRequest event, which lags behind the rapid
batch-by-batch widget additions used to keep the workbench responsive
(#94). Until that resize lands, the layout crams the new fixed-height
rows into the stale, too-small widget, so rows visibly overlap/touch
and only spread apart to their real spacing once the resize catches
up — exactly the "buttons start touching and slowly spread apart"
symptom reported after the previous row-height fix. Forcing an
immediate resize of the list host after each batch keeps row spacing
constant from the very first batch.

Verified the prior intermittent full-suite segfault (test_pr13_config
::test_help_workbench_contents_link_scrolls) is pre-existing and
unrelated: it reproduces at the same rate on a clean, unmodified
checkout. The dupe-specific test files pass cleanly across 20
consecutive runs with this change.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chore: bump version to 0.1.34 for PR prep (#94)
All checks were successful
CI / lint (push) Successful in 7s
CI / lint (pull_request) Successful in 12s
CI / test (push) Successful in 2m14s
CI / test (pull_request) Successful in 2m15s
CI / build-release (push) Successful in 13m31s
CI / release-linux (push) Successful in 0s
CI / build-release (pull_request) Successful in 13m36s
CI / release-linux (pull_request) Successful in 0s
Linux AppImage / build-release (push) Successful in 9m52s
Windows Release / build-release (push) Successful in 10s
CI / build-release-1 (push) Successful in 9s
CI / release-windows (push) Successful in 0s
CI / build-release-1 (pull_request) Successful in 9s
CI / release-windows (pull_request) Successful in 0s
e5b1772833
Compiled application inputs changed on this branch, so the PR-prep
commit replaces the dev VERSION form with the next release per
docs/VERSIONING.md, and records the Duplicates workbench
responsiveness fix in CHANGELOG.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ValleyGeek deleted branch 0.1.33/issue-94-dupe-workbench-slow-load 2026-06-19 03:40:37 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ai-collab/bulk-image-organizer!100
No description provided.