Change 'best take' selection to 'N takes' selection #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Multiple Selected Takes Per Group
This PR replaces the single "best take" concept with support for selecting multiple photos per group. Previously, you could only mark one photo as the "best take" in each group. Now you can select as many photos as you want, including zero.
What Changed
The core change is replacing the single
Photo bestTakefield in PhotoGroup with aLinkedHashSet<Photo> selectedTakes. This maintains insertion order while preventing duplicates.Selection now works as a toggle - pressing spacebar or clicking "Set as Selected Take" will add or remove a photo from the group's selected set. You can have 0, 1, 5, or all photos selected in a group. When exporting, only selected photos get copied, and groups with no selections are skipped.
Configuration
Added a new
DEFAULT_SELECTION_STRATEGYconfig option that controls which photos are automatically selected when groups are created:"first"- selects the first photo (default, maintains existing behavior)"last"- selects the last photo"first_and_last"- selects both first and last photos"all"- selects all photos in the group"none"- no automatic selection (you manually select what you want)UI Changes
Groups with 0 selections now show at 50% opacity so you can easily see which groups haven't been reviewed yet. The currently viewed photo in the bottom thumbnail strip has a 3px red border.
All menu items and internal code now use "selected take" terminology instead of "best take". The star indicator now appears on all selected photos, not just one.
Technical Details
The selection strategy is applied after all photos are added to each group (in GroupingEngine), not when the first photo is added. This was a bug in the initial implementation - strategies like "last" and "first_and_last" need to know all the photos in the group before they can work correctly.
Group thumbnails always use the first photo in the group for consistency, regardless of what's selected. This simplifies the logic and fixes edge cases with the "none" strategy.
Export now handles filename collisions by appending
_1,_2, etc. when multiple selected photos have the same filename.This was implemented with help from Claude Code.