Skip to content

Fix downloading image directly from smart album#4005

Merged
ildyria merged 3 commits intomasterfrom
fix-download-smart-album
Jan 21, 2026
Merged

Fix downloading image directly from smart album#4005
ildyria merged 3 commits intomasterfrom
fix-download-smart-album

Conversation

@ildyria
Copy link
Member

@ildyria ildyria commented Jan 21, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling of smart albums with paginated photo sets to ensure reliable archival and compression across all pages.
  • Improvements

    • Optimized photo compression flow to avoid duplicate processing and ensure consistent results.
    • Enhanced album ID validation for more accurate and consistent request validation.

✏️ Tip: You can customize this high-level summary in your review settings.

@ildyria ildyria requested a review from a team as a code owner January 21, 2026 18:18
@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

Refactors BaseArchive to handle smart albums returning paginated photos by adding paginator- and collection-specific compression paths and moving sub-album recursion to the album-level. Replaces a validation rule in ZipRequest from RandomIDRule(true) to AlbumIDRule(true).

Changes

Cohort / File(s) Summary
Archive Logic Refactoring
app/Actions/Album/BaseArchive.php
Adds compressPhotosFromPaginator() and compressPhotosFromCollection() private methods; detects and iterates LengthAwarePaginator pages; moves recursive sub-album traversal to compressAlbum() and removes duplicate recursion from the collection flow; adds LengthAwarePaginator import.
Request Validation Update
app/Http/Requests/Album/ZipRequest.php, tests/Unit/Http/Requests/Album/ZipRequestTest.php
Replaces RandomIDRule(true) with AlbumIDRule(true) for FROM_ID_ATTRIBUTE validation in both request and its unit test; adds AlbumIDRule import.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hop through pages, one by one,
Paginators hummed till compression's done,
Sub-albums nest where albums dwell,
Rules swapped clean — the basket's well,
A crunchy carrot for the run. 🥕

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.06%. Comparing base (e58e8f7) to head (0870772).
⚠️ Report is 2 commits behind head on master.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ildyria ildyria merged commit c2fee5f into master Jan 21, 2026
78 of 83 checks passed
@ildyria ildyria deleted the fix-download-smart-album branch January 21, 2026 21:28
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.

1 participant