Refactoring and fixes on API v3 - #4728
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe PR replaces separate album and photo bucket commands with ChangesBucket recomputation command
Gallery display filtering
Estimated code review effort: 3 (Moderate) | ~25 minutes Severity of issue fixed: Medium Merge Risk: 🟡 Moderate · up to Separate-shared-only views may filter public albums while drag selection still accounts for them, causing misaligned interactions. Bucket recomputation coverage also does not fully prove child-album behavior, so these correctness risks should be resolved before merge. 🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
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 reads each line, Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
resources/js/composables/album/dragAndSelect.ts (1)
291-295: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winFilter public shared albums before computing drag boxes.
When
shared_albums_visibility_modeisseparate_shared_only, the root virtual views remove public albums before row chunking. This path still includes them. A public album before a directly shared album shifts later hit boxes. Drag selection can then miss or select the wrong visible album.Proposed fix
- (album) => !album.is_nsfw || lycheeStore.are_nsfw_visible, + (album) => + (!album.is_nsfw || lycheeStore.are_nsfw_visible) && + !( + scope === "shared" && + albumsStore.rootConfig?.shared_albums_visibility_mode === "separate_shared_only" && + album.is_public + ),
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 5fb80e4e-b477-495d-8597-c709878cecb8
📒 Files selected for processing (16)
app/Console/Commands/RecomputeAlbumBuckets.phpapp/Console/Commands/RecomputePhotoBuckets.phpapp/Services/AlbumBucketComputer.phpapp/Services/PhotoBucketComputer.phpdatabase/migrations/2026_09_05_120004_remove_owner_id_album_sorting.phpdocs/specs/3-reference/api-design.mddocs/specs/3-reference/database-schema.mddocs/specs/4-architecture/knowledge-map.mdresources/js/composables/album/dragAndSelect.tsresources/js/v8/components/gallery/albumModule/Virtualized/AlbumListViewVirtual.vueresources/js/v8/components/gallery/albumModule/Virtualized/AlbumRootGridVirtual.vueresources/js/v8/components/gallery/albumModule/Virtualized/AlbumRootListViewVirtual.vueresources/js/v8/components/gallery/albumModule/Virtualized/AlbumThumbGridVirtual.vueresources/js/v8/components/gallery/albumModule/Virtualized/PhotoGridVirtual.vuetests/Precomputing/CoverSelection/RecomputeAlbumBucketsCommandTest.phptests/Precomputing/CoverSelection/RecomputeBucketsCommandTest.php
💤 Files with no reviewable changes (3)
- app/Console/Commands/RecomputePhotoBuckets.php
- app/Console/Commands/RecomputeAlbumBuckets.php
- tests/Precomputing/CoverSelection/RecomputeAlbumBucketsCommandTest.php
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Fixes #4717
Summary by CodeRabbit
New Features
lychee:recompute-bucketscommand.Bug Fixes
Documentation