[Feature]: Select 'Keep' Option in Duplicate Workbench #136

Closed
opened 2026-06-24 05:17:39 +00:00 by ValleyGeek · 3 comments
Owner

Problem or use case

Grant the user more autonomy when selecting which image to keep

Proposed solution

Replace the keep behavior in the duplicate workbench.

  • To the right of the 'Single' button add a vertical separator
  • Add a new button to the right of the separator "Keep:"
  • Add a new drop down to the right of "Keep" with:
    • File Size - Largest
    • File Size - Smallest
    • Resolution - Largest
    • Resolution - Smallest
    • Sharpness - Largest
    • Sharpness - Smallest
    • Filename - Longest
    • Filename - Shortest
    • Directory - Longest
      • Using the name of the single directory the image is in
    • Directory - Shortest
    • Relative Path - Longest
      • Using the full relative path + filename
    • Relative Path - Shortest
  • Set key "c" to be equivalent to selecting the "keep" button
  • Add a toggle button "AoK" (Advance on Keep) with tool tip explaining its purpose
  • Add another vertical separator between AoK and "Delete Group"
### Problem or use case Grant the user more autonomy when selecting which image to keep ### Proposed solution Replace the keep behavior in the duplicate workbench. - To the right of the 'Single' button add a vertical separator - Add a new button to the right of the separator "Keep:" - Add a new drop down to the right of "Keep" with: - File Size - Largest - File Size - Smallest - Resolution - Largest - Resolution - Smallest - Sharpness - Largest - Sharpness - Smallest - Filename - Longest - Filename - Shortest - Directory - Longest - Using the name of the single directory the image is in - Directory - Shortest - Relative Path - Longest - Using the full relative path + filename - Relative Path - Shortest - Set key "c" to be equivalent to selecting the "keep" button - Add a toggle button "AoK" (Advance on Keep) with tool tip explaining its purpose - Add another vertical separator between AoK and "Delete Group"
Member

Implemented on branch 0.2.4/issue-136-keep-dropdown (stacked on 0.2.4/issue-138-dupe-grid-view), pushed and awaiting PR/merge.

What changed:

  • Duplicates workbench toolbar: replaced the single "Keep Best" button with a "Keep:" button + criterion dropdown, positioned right of "Single" with a vertical separator on each side, matching the requested layout.
  • Dropdown offers all 12 requested criteria (File Size, Resolution, Sharpness, Filename, Directory, Relative Path — each Largest/Longest or Smallest/Shortest), default Resolution - Largest (matches the prior Keep Best behavior). New KEEP_CRITERIA / DEFAULT_KEEP_CRITERION / pick_keep_path_by_criterion() / keep_by_criterion_delete_paths() in core/dupe_detector.py; ties break alphabetically by relative path.
  • "AoK" (Advance on Keep) toggle button added between the dropdown and "Delete Group" (with its own separator before Delete Group), on by default, with a tooltip explaining it auto-advances to the next group after Keep — turning it off keeps the workbench on the same group.
  • c is wired as the default shortcut for the new dupe_keep action via the existing shortcut-registry/override mechanism (shown as "C" in Settings → Shortcuts), and overridable like other shortcuts.

Testing: new unit coverage for the criterion-picking helpers and fallback-on-unknown-id behavior (tests/test_pr11_dupe.py), the default shortcut (tests/test_pr13_config.py), and the new dropdown/AoK widgets + MainWindow._on_dupe_keep_best integration (tests/test_dupe_keep_criteria.py). Full suite (587 tests) passes; ruff check/ruff format --check clean; scripts/smoke-ui-exit.sh clean.

Docs: resources/help/USER_GUIDE.md, docs/DESIGN.md, docs/TECHNICAL_OUTLINE.md updated; VERSION bumped to 0.2.5 per PR-prep policy with a CHANGELOG.md entry.

Commits: 19823a8 (feature), 400f0f9 (tests), e3da1ba (PR-prep/docs/version).

Implemented on branch `0.2.4/issue-136-keep-dropdown` (stacked on `0.2.4/issue-138-dupe-grid-view`), pushed and awaiting PR/merge. **What changed:** - Duplicates workbench toolbar: replaced the single "Keep Best" button with a "Keep:" button + criterion dropdown, positioned right of "Single" with a vertical separator on each side, matching the requested layout. - Dropdown offers all 12 requested criteria (File Size, Resolution, Sharpness, Filename, Directory, Relative Path — each Largest/Longest or Smallest/Shortest), default `Resolution - Largest` (matches the prior Keep Best behavior). New `KEEP_CRITERIA` / `DEFAULT_KEEP_CRITERION` / `pick_keep_path_by_criterion()` / `keep_by_criterion_delete_paths()` in `core/dupe_detector.py`; ties break alphabetically by relative path. - "AoK" (Advance on Keep) toggle button added between the dropdown and "Delete Group" (with its own separator before Delete Group), on by default, with a tooltip explaining it auto-advances to the next group after Keep — turning it off keeps the workbench on the same group. - `c` is wired as the default shortcut for the new `dupe_keep` action via the existing shortcut-registry/override mechanism (shown as "C" in Settings → Shortcuts), and overridable like other shortcuts. **Testing:** new unit coverage for the criterion-picking helpers and fallback-on-unknown-id behavior (`tests/test_pr11_dupe.py`), the default shortcut (`tests/test_pr13_config.py`), and the new dropdown/AoK widgets + `MainWindow._on_dupe_keep_best` integration (`tests/test_dupe_keep_criteria.py`). Full suite (587 tests) passes; `ruff check`/`ruff format --check` clean; `scripts/smoke-ui-exit.sh` clean. **Docs:** `resources/help/USER_GUIDE.md`, `docs/DESIGN.md`, `docs/TECHNICAL_OUTLINE.md` updated; `VERSION` bumped to `0.2.5` per PR-prep policy with a `CHANGELOG.md` entry. Commits: `19823a8` (feature), `400f0f9` (tests), `e3da1ba` (PR-prep/docs/version).
Member

Follow-up after review feedback, pushed to the same branch (0.2.4/issue-136-keep-dropdown):

  • Removed the colon from the button label: "Keep:" → "Keep".
  • Default criterion changed from Resolution - Largest to File Size - Largest.
  • The default is now configurable: Settings → Duplicates → "Default Keep criterion".
  • Pressing Keep now clears DELETE from the chosen image if an earlier Keep press (with a different criterion) had already marked it, instead of only ever adding DELETE to the losers.

Still open pending PR/merge to main.

Follow-up after review feedback, pushed to the same branch (`0.2.4/issue-136-keep-dropdown`): - Removed the colon from the button label: "Keep:" → "Keep". - Default criterion changed from Resolution - Largest to File Size - Largest. - The default is now configurable: Settings → Duplicates → "Default Keep criterion". - Pressing Keep now clears DELETE from the chosen image if an earlier Keep press (with a different criterion) had already marked it, instead of only ever adding DELETE to the losers. Still open pending PR/merge to `main`.
Member

Closing — PR #141 is open against main.

Closing — PR #141 is open against `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#136
No description provided.