Repository navigation
Conversation
On This Day filtered on MONTH() and DAY() of taken_at or created_at, so every query (cover, Album::head header count and offset, photo list) scanned the photos table. photos.month_day_key holds the local day where the photo was taken (as taken_key), else the upload day, and is indexed. It is written explicitly in the Save and SaveIfDirty pipes, PhotoController::update and lychee:takedate, and filled for existing photos by the migration. Spec impact: Feature 106 spec, plan, tasks and open questions (Q-106-01 A), roadmap and knowledge map entries."
Findings
|
| Layer / File(s) | Summary |
|---|---|
Define and index the month-day key app/Services/MonthDayKey.php, app/Models/Photo.php, database/migrations/*, tests/Unit/Services/MonthDayKeyTest.php, docs/specs/4-architecture/features/106-on-this-day-index/* |
MonthDayKey derives a month-and-day integer from the date in its own time zone, using created_at when no taken date is available. The migration adds and backfills the nullable column, creates its index, and removes both on rollback. The feature documents record the date rule and migration verification notes. |
Maintain the key on photo writes app/Actions/Photo/Pipes/*/Save*.php, app/Console/Commands/ImageProcessing/Takedate.php, app/Http/Controllers/Gallery/PhotoController.php, database/factories/PhotoFactory.php, tests/Feature_v3/Photo/PhotoKeysWriteTest.php, docs/specs/4-architecture/features/106-on-this-day-index/* |
The save pipes, photo update, and takedate command assign month_day_key. The factory and write-path tests also set or verify the key for taken-date and upload-date cases. |
Filter the On This Day album by key app/SmartAlbums/OnThisDayAlbum.php, tests/Feature_v3/Album/*, docs/specs/4-architecture/features/106-on-this-day-index/*, docs/specs/4-architecture/knowledge-map.md, docs/specs/4-architecture/roadmap.md |
The album matches today’s key and restricts upload-date matching to photos created before the current year. Tests cover date matching, taken-date precedence, upload-date eligibility, and a time-zone boundary. The architecture records describe the index and query. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Merge Risk: 
Moderate · up to fec91
-
On non-UTC installations, photos uploaded near midnight can appear under different On This Day dates depending on when their key was populated. Align live writes with the stored-date rule before merging, and correct the roadmap status.
Pre-merge checks: 
1
-
Failed checks: 1 warningFull details: Docstring Coverage
-
Explanation
Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 7 functions across 13 files. (6 skipped: 6 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the dates at dawn,
And hops where month and day align.
A key keeps each photo in its place,
While old uploads join the trace.
The album finds them, one by one.
There was a problem hiding this comment.
Actionable comments posted: 2

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
312764f5-abd5-4319-b137-a244309916c4
Files selected for processing: 19-
app/Actions/Photo/Pipes/Duplicate/SaveIfDirty.phpapp/Actions/Photo/Pipes/Shared/Save.phpapp/Console/Commands/ImageProcessing/Takedate.phpapp/Http/Controllers/Gallery/PhotoController.phpapp/Models/Photo.phpapp/Services/MonthDayKey.phpapp/SmartAlbums/OnThisDayAlbum.phpdatabase/factories/PhotoFactory.phpdatabase/migrations/2026_11_01_000001_add_month_day_key_to_photos.phpdocs/specs/4-architecture/features/106-on-this-day-index/open-questions.mddocs/specs/4-architecture/features/106-on-this-day-index/plan.mddocs/specs/4-architecture/features/106-on-this-day-index/spec.mddocs/specs/4-architecture/features/106-on-this-day-index/tasks.mddocs/specs/4-architecture/knowledge-map.mddocs/specs/4-architecture/roadmap.mdtests/Feature_v3/Album/AlbumCategoryV3Test.phptests/Feature_v3/Album/OnThisDayAlbumTest.phptests/Feature_v3/Photo/PhotoKeysWriteTest.phptests/Unit/Services/MonthDayKeyTest.php
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
-
Codecov Report❌ Patch coverage is 🚀 New features to boost your workflow:
|
On This Day filtered on MONTH() and DAY() of taken_at or created_at, so every query (cover, Album::head header count and offset, photo list) scanned the photos table. photos.month_day_key holds the local day where the photo was taken (as taken_key), else the upload day, and is indexed. It is written explicitly in the Save and SaveIfDirty pipes, PhotoController::update and lychee:takedate, and filled for existing photos by the migration. Spec impact: Feature 106 spec, plan, tasks and open questions (Q-106-01 A), roadmap and knowledge map entries."
Summary by CodeRabbit