PictoPy icon indicating copy to clipboard operation
PictoPy copied to clipboard

BUG: On Jan 1, "On this day" shows last night's New Year's Eve photos as "1 year ago today"

Open Saurabhyadav0 opened this issue 1 month ago • 8 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

What happened?

The anniversary memory looks one day either side of today (_anniversary_window). Photos are then grouped by their own calendar year, and years_ago = reference.year - capture_year. That's wrong across New Year: seen from Jan 1, 2026, a photo from Dec 31, 2025 is one day old, but it passes the year <= 2025 filter and is counted as "1 year ago".

Reproduced through POST /memories/generate (reference_date: 2026-01-01) and GET /memories/{id}, with six photos each from Dec 31 2025, Jan 1 2025 and Dec 31 2024:

  • "1 year ago today · January 2025" has the Jan 1, 2025 photos and the Dec 31, 2025 ones (last night)
  • "2 years ago today · December 2024" shows photos from Dec 31, 2024, which is 1 year and 1 day ago

Every import or sync runs curation for today's date (routes/folders.py calls memory_curator_run() with date.today()), so this shows up for anyone who adds photos on Jan 1. New Year's Eve is one of the busiest photo nights of the year.

The culprit is _curate_anniversaries() in backend/app/utils/memory_curator.py: it filters candidates on the photo's own calendar year and sets years_ago = reference.year - capture_year, instead of crediting each photo to the anniversary nearest the reference date.

Expected: on Jan 1, 2026, Dec 31, 2025 photos are not shown, Dec 31, 2024 photos count as "1 year ago", and the existing calendar-edge test (test_handles_calendar_edges) also checks which year each photo is credited to.

I'd like to work on this.

Screenshots

Memories page — the "1 year ago today · January 2025" card shows 12 photos (should be 6):

Memories grid

Opening that same card — a photo captioned "31 December 2025" (slide 11/12) inside a "1 year ago" memory:

Memory story viewer

Reproduction script output (reference date 2026-01-01):

Repro script output

Record

  • [x] I agree to follow this project's Code of Conduct

Saurabhyadav0 avatar Oct 20 '26 14:10 Saurabhyadav0

👋 Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)

github-actions[bot] avatar Oct 20 '26 14:10 github-actions[bot]

⚠️ Potential Duplicate Issue (Semantic Match)

This issue appears semantically similar to the following issues in AOSSIE-Org/PictoPy:

  1. fix: date-based memories are misclassified as location memories (#1229, open) https://github.com/AOSSIE-Org/PictoPy/issues/1229 Similarity: 56.1%

  2. Feat: Weekends category in memories section (#1213, open) https://github.com/AOSSIE-Org/PictoPy/issues/1213 Similarity: 56.1%

Please review before proceeding.

github-actions[bot] avatar Oct 20 '26 14:10 github-actions[bot]

@rohan-pandeyy i have checked its not a duplicate issue i check please assign this so that i can fix it

Saurabhyadav0 avatar Oct 20 '26 15:10 Saurabhyadav0

Link your account with Gitcord

Thanks for opening this issue, @Saurabhyadav0!

To receive Discord notifications and contributor tracking for this organization:

  1. Join Discord: https://discord.gg/hjUhu33uAn
  2. In Discord, run /link Saurabhyadav0
  3. Paste the verification code into your GitHub bio (or a public gist)
  4. Click Verify in Discord (or run /verify-link Saurabhyadav0)

Once linked, Gitcord can notify you about assignments, mentions, and more.

— Posted by Gitcord

gitcordapp[bot] avatar Oct 20 '26 15:10 gitcordapp[bot]

@Saurabhyadav0 Is this issue solved? If not can u inform and assign me the issue

Darkspectre123 avatar Nov 08 '26 12:11 Darkspectre123

@rohan-pandeyy please assign this when free , sorry @Darkspectre123 working on it

Saurabhyadav0 avatar Nov 08 '26 13:11 Saurabhyadav0

@rohan-pandeyy Thank you for assigning this issue to me. I will create the PR in few days ..

Darkspectre123 avatar Nov 15 '26 18:11 Darkspectre123

@rohan-pandeyy Can u look into the pr and provide the workflow approval please

Darkspectre123 avatar Nov 29 '26 16:11 Darkspectre123