fix: prevent culling group ID collisions and preserve manual selections#6
Merged
ncoevoet merged 1 commit intoncoevoet:masterfrom Apr 6, 2026
Merged
Conversation
- Offset similar group IDs by burst_count to avoid ID collisions when burst and similar groups are merged in the culling endpoint - Guard autoSelectBest to not overwrite existing selections when loading more groups via infinite scroll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
burst_countin the culling endpoint to prevent ID collisions when burst and similar groups are merged in paginated responsesautoSelectBestto not overwrite existing selections when loading more groups via infinite scrollProblem
When scrolling through culling groups (burst + similar), two bugs caused selections to be lost:
ID collisions: Similar groups were assigned IDs starting from 0, which could collide with burst group IDs (also starting from 0) when both types appear in the same paginated response. This caused selections to be overwritten or lost.
Scroll overwriting: When
loadMore`` fetched new groups,autoSelectBest` would overwrite any existing selections for groups that the user had already manually adjusted.Fix
Similar group IDs are now offset by
burst_count+ burst_count, ensuring unique IDs across both group types.autoSelectBestnow checksif (!map.has(group.group_id))before setting a selection, preserving any existing user selections.Testing
--dry-runthat rejected photos are correctly marked