[Bug]: When changing between dupe groups, active image pointer doesn't reset #99

Closed
opened 2026-06-18 05:47:36 +00:00 by ValleyGeek · 2 comments
Owner

App version

0.1.33

Platform

Both

Steps to reproduce

  1. View an image in a duplicate set using the single image viewer that has at least two more images than the next set
  2. Select any image from the set that's at least two higher in the count than the next image set (the 4th+ image in a set, as counted using the filmstrip)
  3. Navigate to any set with at least two fewer images

Expected behavior

The first image of the new set is selected as the active image in the viewer scene with the carousel and filmstrip updated accordingly

Actual behavior

The active image in the scene remains from the previously selected set. The carousel doesn't update with new images. The filmstrip has the right most image in the newly chosen set highlighted.

Additional context

No response

### App version 0.1.33 ### Platform Both ### Steps to reproduce 1. View an image in a duplicate set using the single image viewer that has at least two more images than the next set 2. Select any image from the set that's at least two higher in the count than the next image set (the 4th+ image in a set, as counted using the filmstrip) 3. Navigate to any set with at least two fewer images ### Expected behavior The first image of the new set is selected as the active image in the viewer scene with the carousel and filmstrip updated accordingly ### Actual behavior The active image in the scene remains from the previously selected set. The carousel doesn't update with new images. The filmstrip has the right most image in the newly chosen set highlighted. ### Additional context _No response_
Member

Same root cause as #93: _on_dupe_keep_best/_on_dupe_delete_group advanced the active duplicate group without resyncing the viewer (the prev/next/tag-filter-changed handlers already did this correctly).

Investigating the repro also surfaced a related latent crash: when the active group switches to one with fewer images while the viewer is parked on a higher index, _apply_dupe_group_filter's internal viewer resync (resync_after_scan_pick_post_prune_index) could index past the end of its prior-path list and raise IndexError, which aborted the call chain before the correct resync ever ran — this is the most direct explanation for the stale image / filmstrip-clamped-to-last-image symptom described here. Hardened with a defensive clamp.

Fix implemented on branch 0.1.35/issue-99-dupe-viewer-resync (commit 87289cb), with a regression test reproducing the larger→smaller group transition from this report. Awaiting PR to main.

Same root cause as #93: `_on_dupe_keep_best`/`_on_dupe_delete_group` advanced the active duplicate group without resyncing the viewer (the prev/next/tag-filter-changed handlers already did this correctly). Investigating the repro also surfaced a related latent crash: when the active group switches to one with fewer images while the viewer is parked on a higher index, `_apply_dupe_group_filter`'s internal viewer resync (`resync_after_scan` → `_pick_post_prune_index`) could index past the end of its prior-path list and raise `IndexError`, which aborted the call chain before the correct resync ever ran — this is the most direct explanation for the stale image / filmstrip-clamped-to-last-image symptom described here. Hardened with a defensive clamp. Fix implemented on branch `0.1.35/issue-99-dupe-viewer-resync` (commit 87289cb), with a regression test reproducing the larger→smaller group transition from this report. Awaiting PR to `main`.
Member

Fixed on branch 0.1.35/issue-99-dupe-viewer-resync (now rebased onto current main, including the CI fix from #106/#107 so this branch gets a real dev build). VERSION bumped to 0.1.36 and CHANGELOG updated. Opening a PR to main.

Fixed on branch `0.1.35/issue-99-dupe-viewer-resync` (now rebased onto current `main`, including the CI fix from #106/#107 so this branch gets a real dev build). VERSION bumped to 0.1.36 and CHANGELOG updated. Opening a PR to `main`.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#99
No description provided.