[Bug]: Dupe Multi tag pips turn gray after marking an image DELETE #179

Open
opened 2026-08-26 05:16:39 +00:00 by Grok · 0 comments
Member

Affected area

Duplicates workbench — Multi comparison view (DupeMultiGrid). The colored tag pips (dots) under each comparison image.

Report

In Dupe Multi, after marking an image as deleted (DELETE tag — right-click / Del / Keep on others), the existing tag pips under that image (and others in the group) turn gray. The tags themselves are still applied; only the pip colors are lost. The red DELETE outline still appears.

Steps to reproduce

  1. Open a workspace with a duplicate group whose members also have ordinary (colored) user tags.
  2. Switch to Duplicates → Multi.
  3. Confirm the pips under the images use those tag colors.
  4. Mark one image DELETE (toggle DELETE on that tile).

Expected

  • DELETE outline appears on the marked image.
  • User-tag pips keep their assigned colors (DELETE is not shown as a pip; is_panel_tag already excludes it).

Actual

  • DELETE outline appears.
  • Tag pips under the images render gray (QColor(120, 120, 120) fallback) instead of the tag colors.

Cause

Initial Multi load goes through _refresh_dupe_multi_view()_enrich_dupe_group_images(), which fills tag_colors from get_all_tags().

Marking DELETE goes through _on_dupe_multi_mark_single_toggle_delete_on_paths_after_tag_apply(). That path calls:

images = self._dupe_group_images()
self.dupe_multi_grid.sync_image_tags(images)

_dupe_group_images() is WorkingDB.get_image_dicts_for_dupe_tag(), which always sets tag_colors to {} (it never joins tag colors).

DupeMultiGrid.sync_image_tags() then overwrites the in-memory colors whenever the source dict has the key:

if "tag_colors" in source:
    item["tag_colors"] = source.get("tag_colors")  # {}

_MetadataTagDots.paintEvent() paints missing colors as gray:

fill = QColor(color) if color else QColor(120, 120, 120)

The same _after_tag_apply path is used for Keep (mark others DELETE) and any other tag apply while Multi is showing, so pips go gray after those actions too.

The viewer-return path already does this correctly: _sync_dupe_multi_view_tags() calls _enrich_dupe_group_images(self._dupe_group_images()) before sync_image_tags().

Suggested fix

In _after_tag_apply (dupes Multi branch), pass enriched dicts, matching _sync_dupe_multi_view_tags():

images = self._enrich_dupe_group_images(self._dupe_group_images())
self.dupe_multi_grid.sync_image_tags(images)

Optionally have get_image_dicts_for_dupe_tag() populate colors so every consumer does not have to remember to enrich.

Acceptance criteria

  • After toggling DELETE on a Multi tile, user-tag pips keep their colors; DELETE is still not shown as a pip; the red outline still appears.
  • Keep / mark-others-DELETE and other tag applies in Multi also keep pip colors.
  • Clearing DELETE restores colors if they were already correct (no extra gray flash).
  • Grid / filmstrip / Single viewer tag chrome is unchanged.
### Affected area Duplicates workbench — **Multi** comparison view (`DupeMultiGrid`). The colored tag pips (dots) under each comparison image. ### Report In Dupe Multi, after marking an image as deleted (`DELETE` tag — right-click / Del / Keep on others), the **existing tag pips under that image (and others in the group) turn gray**. The tags themselves are still applied; only the pip colors are lost. The red DELETE outline still appears. ### Steps to reproduce 1. Open a workspace with a duplicate group whose members also have ordinary (colored) user tags. 2. Switch to Duplicates → **Multi**. 3. Confirm the pips under the images use those tag colors. 4. Mark one image DELETE (toggle DELETE on that tile). ### Expected - DELETE outline appears on the marked image. - User-tag pips keep their assigned colors (DELETE is not shown as a pip; `is_panel_tag` already excludes it). ### Actual - DELETE outline appears. - Tag pips under the images render gray (`QColor(120, 120, 120)` fallback) instead of the tag colors. ### Cause Initial Multi load goes through `_refresh_dupe_multi_view()` → `_enrich_dupe_group_images()`, which fills `tag_colors` from `get_all_tags()`. Marking DELETE goes through `_on_dupe_multi_mark_single` → `_toggle_delete_on_paths` → `_after_tag_apply()`. That path calls: ```python images = self._dupe_group_images() self.dupe_multi_grid.sync_image_tags(images) ``` `_dupe_group_images()` is `WorkingDB.get_image_dicts_for_dupe_tag()`, which always sets `tag_colors` to `{}` (it never joins tag colors). `DupeMultiGrid.sync_image_tags()` then overwrites the in-memory colors whenever the source dict has the key: ```python if "tag_colors" in source: item["tag_colors"] = source.get("tag_colors") # {} ``` `_MetadataTagDots.paintEvent()` paints missing colors as gray: ```python fill = QColor(color) if color else QColor(120, 120, 120) ``` The same `_after_tag_apply` path is used for Keep (mark others DELETE) and any other tag apply while Multi is showing, so pips go gray after those actions too. The viewer-return path already does this correctly: `_sync_dupe_multi_view_tags()` calls `_enrich_dupe_group_images(self._dupe_group_images())` before `sync_image_tags()`. ### Suggested fix In `_after_tag_apply` (dupes Multi branch), pass enriched dicts, matching `_sync_dupe_multi_view_tags()`: ```python images = self._enrich_dupe_group_images(self._dupe_group_images()) self.dupe_multi_grid.sync_image_tags(images) ``` Optionally have `get_image_dicts_for_dupe_tag()` populate colors so every consumer does not have to remember to enrich. ### Acceptance criteria - [ ] After toggling DELETE on a Multi tile, user-tag pips keep their colors; DELETE is still not shown as a pip; the red outline still appears. - [ ] Keep / mark-others-DELETE and other tag applies in Multi also keep pip colors. - [ ] Clearing DELETE restores colors if they were already correct (no extra gray flash). - [ ] Grid / filmstrip / Single viewer tag chrome is unchanged.
Sign in to join this conversation.
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#179
No description provided.