[Enhancement]: Clear Untagged Only When Changing Tag Filter #86

Closed
opened 2026-06-14 19:11:05 +00:00 by ValleyGeek · 3 comments
Owner

Affected area

Tag Filter

Current behavior

When Untagged Only is checked and a new tag filter is applied no images are displayed

Desired improvement

Clear the Untagged Only checkbox any time a tag filter is applied.

References

No response

### Affected area Tag Filter ### Current behavior When `Untagged Only` is checked and a new tag filter is applied no images are displayed ### Desired improvement Clear the `Untagged Only` checkbox any time a tag filter is applied. ### References _No response_
Member

Fixed on branch 0.1.40/issue-86-91-tag-filter-fixes (queued for PR to main, not yet opened).

TagFilterDropdown._move_tag() (the normal click-to-filter path) already cleared "Untagged Only" when a tag filter was applied. The right-click "make this the only active filter" path (_set_exclusive_active) applies a tag filter too but skipped that clear, so combining it with a stale Untagged Only checkbox left the grid showing nothing. Factored the clear into a shared _clear_untagged_only() helper used by both paths.

Added regression tests in tests/test_tag_filter_enhancements.py for both paths.

Closing — fix implemented and tested.

Fixed on branch `0.1.40/issue-86-91-tag-filter-fixes` (queued for PR to `main`, not yet opened). `TagFilterDropdown._move_tag()` (the normal click-to-filter path) already cleared "Untagged Only" when a tag filter was applied. The right-click "make this the only active filter" path (`_set_exclusive_active`) applies a tag filter too but skipped that clear, so combining it with a stale Untagged Only checkbox left the grid showing nothing. Factored the clear into a shared `_clear_untagged_only()` helper used by both paths. Added regression tests in `tests/test_tag_filter_enhancements.py` for both paths. Closing — fix implemented and tested.
Author
Owner

When a tag filter is active and 'Untagged Only' is checked, the filters update correctly. The tag element in the Tag Filter menu is cleared from the 'Active' heading but not redrawn in the 'Available' menu until the tag filter dropdown is closed and re-opened.

When a tag filter is active and 'Untagged Only' is checked, the filters update correctly. The tag element in the `Tag Filter` menu is cleared from the 'Active' heading but not redrawn in the 'Available' menu until the tag filter dropdown is closed and re-opened.
Member

Good catch, and thanks for the precise repro — found the actual cause this time. Fixed on branch 0.1.47/issue-111-86-64-89-feedback-fixes.

The first round of this fix only patched the tag-click paths (_move_tag / _set_exclusive_active). The path you exercised — checking Untagged Only while a tag filter is active — goes through a separate handler, TagFilterDropdown._on_untagged_only(), which cleared self._active but never moved those tags back into self._available. So they vanished from the dropdown entirely until you closed and reopened it, which rebuilds the lists from scratch and papers over the gap. Fixed to mirror the same move-back behavior the other two paths already had. Added a regression test (test_tag_filter_untagged_only_moves_cleared_active_tag_to_available) that asserts the tag reappears in Available immediately, without needing to reopen the dropdown.

Closing again — let me know if it still doesn't redraw correctly for your case.

Good catch, and thanks for the precise repro — found the actual cause this time. Fixed on branch `0.1.47/issue-111-86-64-89-feedback-fixes`. The first round of this fix only patched the tag-click paths (`_move_tag` / `_set_exclusive_active`). The path you exercised — checking **Untagged Only** while a tag filter is active — goes through a separate handler, `TagFilterDropdown._on_untagged_only()`, which cleared `self._active` but never moved those tags back into `self._available`. So they vanished from the dropdown entirely until you closed and reopened it, which rebuilds the lists from scratch and papers over the gap. Fixed to mirror the same move-back behavior the other two paths already had. Added a regression test (`test_tag_filter_untagged_only_moves_cleared_active_tag_to_available`) that asserts the tag reappears in Available immediately, without needing to reopen the dropdown. Closing again — let me know if it still doesn't redraw correctly for your case.
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#86
No description provided.