fix(dupe): resync viewer session after keep-best/delete-group; harden post-prune index #108
No reviewers
Labels
No labels
Kind/Bug
Kind/Feature
Priority/High
Priority/Medium
Reviewed/Confirmed
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ai-collab/bulk-image-organizer!108
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "0.1.35/issue-99-dupe-viewer-resync"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
X) while in the single image viewer advanced the active duplicate group's data but never resynced the viewer, so the displayed image, carousel, and filmstrip stayed pointed at the old group (#93, #99)._on_dupe_group_prev/_on_dupe_group_nextand_on_dupe_tag_filter_changedalready call_resync_dupe_viewer_session()after switching groups;_on_dupe_keep_bestand_on_dupe_delete_groupare now brought in line with that pattern._apply_dupe_group_filter's call to_refresh_tag_filter_viewsresolves the viewer's prior proxy rows against the already-updated filter (group filters invalidate the proxy synchronously), which can yield a prior-path list shorter than the captured prior index, raisingIndexErrorin_pick_post_prune_indexbefore the explicit resync ever ran. Hardened with a defensive clamp — the immediate, authoritative_resync_dupe_viewer_session()call still supersedes whatever index this picks for the duplicate-navigation paths.Fixes #93, #99.
Threading notes: no worker threads involved; all changes are main-thread Qt slot/widget code.
Test plan
test_dupe_delete_group_resyncs_viewer_with_hide_deleted(issue #93 repro) andtest_dupe_keep_best_resyncs_viewer_index_to_smaller_group(issue #99 repro) totests/test_pr8_viewer.pypytest— 365 passed, 1 skippedruff check . && ruff format --check ../scripts/check-version-bump.sh— VERSION bumped 0.1.35 → 0.1.36 (compiled inputs changed)./scripts/smoke-ui-exit.sh— clean Qt teardown🤖 Generated with Claude Code
Bump VERSION to the next canonical release (compiled inputs changed on this branch, confirmed via ./scripts/compiled-inputs-changed.sh origin/main) and record the fix in CHANGELOG.md under [0.1.36]. No USER_GUIDE.md changes needed: the guide's existing Keep Best/Delete Group description ("advance to the next group") already matches the fixed behavior - it just wasn't fully implemented for the single-image viewer case before this fix.