Skip to content

Conversation

@makhin
Copy link
Owner

@makhin makhin commented Dec 3, 2025

Summary

  • add photo deduplication service to merge photos sharing the same image hash and move their file records to the primary photo
  • expose the deduplication logic through a new merge-duplicates console command and wire it into dependency injection
  • document the new CLI capability in the console README

Testing

  • dotnet build PhotoBank.Console.csproj

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 34 to 38
{
ImageHash = g.Key!,
PhotoIds = g.Select(p => p.Id).OrderBy(id => id).ToList(),
})
.Where(g => g.PhotoIds.Count > 1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace untranslatable GroupBy ToList projection

The new duplicate merge command will throw before doing any work because the grouping pipeline builds PhotoIds = g.Select(p => p.Id).OrderBy(id => id).ToList() inside the EF Core query (lines 34-38). Npgsql/EF Core cannot translate ToList() within a grouped projection, so running merge-duplicates will raise “The LINQ expression … could not be translated” instead of returning duplicate groups. Materialize only translatable aggregates (e.g., Count/Min) or fetch the ID lists in a separate query so the command can execute.

Useful? React with 👍 / 👎.

Base automatically changed from claude/duplicate-files-multi-storage-01M6cSZdpdbrnMaghZLHd7m8 to master December 5, 2025 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants