fix: eliminate false-positive duplicate mega-groups

The union-find algorithm caused transitivity chains: A≈B and B≈C merged
A, B, C into one group even if A and C were completely different photos,
producing the 5000+ "duplicate" groups that were wrong.

- getGroups now returns individual pairs (2 photos each) — what was
  actually flagged by the pHash comparison, no chaining
- scan() clears all existing pairs on each run so the result exactly
  matches the current threshold (no stale loose pairs from prior scans)
- Default dedupe_threshold lowered from 10 → 5 (fewer false positives;
  distance ≤5 means the images are genuinely near-identical)

Run "Scan library" once to replace the old results with clean pairs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-08-19 16:20:33 -04:00
1 parent 64cca095ea
commit e58e6de125
2 files changed
+15 -27

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ const SETTING_DEFAULTS = {
thumb_quality: '80',
preview_size: '1600',
preview_quality: '85',
dedupe_threshold: '10',
dedupe_threshold: '5',
// iCloud Photos sync
icloud_enabled: '0',
icloud_apple_id: '',