Skip to content

Release v0.4.8: dedupe re-copied images#14

Merged
peterdsp merged 2 commits into
mainfrom
dedupe-images-0.4.8
Jul 14, 2026
Merged

Release v0.4.8: dedupe re-copied images#14
peterdsp merged 2 commits into
mainfrom
dedupe-images-0.4.8

Conversation

@peterdsp

Copy link
Copy Markdown
Owner

Why

Copying the same image twice added a second history entry instead of moving the existing one to the top. Image entries stored a random UUID as their reference id, so two copies of the same image never compared equal and stacked as duplicates. (Text already deduped correctly.)

How

Derive the image reference id from the image content itself - img-{width}x{height}-{fnv1a-fingerprint} - instead of a random UUID. Identical images now map to the same id, so:

  • history dedupes the re-copy, bumps its copy count, and bubbles the existing entry to the top (the same behaviour text already had)
  • the on-disk PNG is reused instead of writing a new file per copy (a re-copy skips the encode + write entirely)

Added unit tests: identical images share a ref id; different content or dimensions do not collide.

Also bumps the workspace version 0.4.7 -> 0.4.8 and corrects the app size / RAM figures on the marketing site and press page.

peterdsp added 2 commits July 14, 2026 12:54
Image entries used a random UUID as their stored reference, so copying
the same image again never matched an existing entry and stacked as a
duplicate. Derive the reference id from the image content (dimensions +
FNV-1a fingerprint) so identical images map to the same id: history now
dedupes the re-copy, bumps its copy count, and moves it to the top,
while reusing the on-disk PNG instead of writing a new file each time.
Copilot AI review requested due to automatic review settings July 14, 2026 09:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@peterdsp
peterdsp merged commit 70f1ea6 into main Jul 14, 2026
4 checks passed
@peterdsp
peterdsp deleted the dedupe-images-0.4.8 branch July 14, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants