[Bug]: Adding tags from image viewer when 'Untagged Only' Tag Filter Active skips next image #38

Closed
opened 2026-06-10 06:24:42 +00:00 by ValleyGeek · 1 comment
Owner

App version

0.1.17

Platform

Both

Steps to reproduce

  1. Enable the Untagged Only tag filter
  2. In the Grid workbench open an image in the image viewer
  3. tag the image

Expected behavior

The image is tagged, the active image remains unchanged, the carousel remains unchanged, and the filmstrip remain unchanged. The next image key 'd' moves to the next image in the set, the image visibly selectable on the carousel is the one immediately following the tagged image, the filmstrip still shows the next images. Once the user intentionally changes to the next image, then the filmstrip and carousel can be updated to remove the image that was tagged. In grid view, adding a tag should immediately update the grid and filters as it currently does but in the image viewer, the UI needs to hold the refresh until the user sequences away from the tagged image.

Actual behavior

The image is tagged properly and remains visible in the scene but the active image is changed to the next image without refreshing the main scene causing the next image to really be two ahead, skipping an image never displayed to the user.

Additional context

No response

### App version 0.1.17 ### Platform Both ### Steps to reproduce 1. Enable the `Untagged Only` tag filter 2. In the Grid workbench open an image in the image viewer 3. tag the image ### Expected behavior The image is tagged, the active image remains unchanged, the carousel remains unchanged, and the filmstrip remain unchanged. The next image key 'd' moves to the next image in the set, the image visibly selectable on the carousel is the one immediately following the tagged image, the filmstrip still shows the next images. Once the user intentionally changes to the next image, then the filmstrip and carousel can be updated to remove the image that was tagged. In grid view, adding a tag should immediately update the grid and filters as it currently does but in the image viewer, the UI needs to hold the refresh until the user sequences away from the tagged image. ### Actual behavior The image is tagged properly and remains visible in the scene but the active image is changed to the next image without refreshing the main scene causing the next image to really be two ahead, skipping an image never displayed to the user. ### Additional context _No response_
ValleyGeek changed title from [Bug]: Adding tags from iamge viewer when 'Untagged Only' Tag Filter Active skips next image to [Bug]: Adding tags from image viewer when 'Untagged Only' Tag Filter Active skips next image 2026-06-10 07:02:00 +00:00
Member

Root cause: tagging the viewer's active image while a tag filter (e.g. "Untagged Only") is active caused _after_tag_apply's filter resync to immediately advance the viewer to the next surviving image the instant the tag was applied — before the user ever pressed a navigation key. A subsequent d/a press then skipped one further image, since the active position had already silently moved.

Fix: while the viewer is showing the just-tagged active image, pin it into the live filter proxy (ImageFilterProxy.set_pinned_relative_path) so the display, filmstrip, and carousel stay untouched. The pin is released only on the next intentional navigation (or on leaving the viewer), at which point the proxy re-filters and navigation lands on the image immediately following/preceding the tagged one — matching the expected behavior described in this report.

Fixed on branch 0.1.36/issue-38-viewer-tag-skip (commit bfb7a15), with regression tests covering next/prev navigation after tagging the active image out of an "Untagged Only" filter. VERSION bumped to 0.1.37 and CHANGELOG updated. Opening a PR to main.

Root cause: tagging the viewer's active image while a tag filter (e.g. "Untagged Only") is active caused `_after_tag_apply`'s filter resync to immediately advance the viewer to the next surviving image the instant the tag was applied — before the user ever pressed a navigation key. A subsequent `d`/`a` press then skipped one further image, since the active position had already silently moved. Fix: while the viewer is showing the just-tagged active image, pin it into the live filter proxy (`ImageFilterProxy.set_pinned_relative_path`) so the display, filmstrip, and carousel stay untouched. The pin is released only on the next intentional navigation (or on leaving the viewer), at which point the proxy re-filters and navigation lands on the image immediately following/preceding the tagged one — matching the expected behavior described in this report. Fixed on branch `0.1.36/issue-38-viewer-tag-skip` (commit bfb7a15), with regression tests covering next/prev navigation after tagging the active image out of an "Untagged Only" filter. VERSION bumped to 0.1.37 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#38
No description provided.