Skip to content

Fix loading photos on paginated#4190

Merged
ildyria merged 1 commit intomasterfrom
some-photo-do-not-open
Mar 16, 2026
Merged

Fix loading photos on paginated#4190
ildyria merged 1 commit intomasterfrom
some-photo-do-not-open

Conversation

@ildyria
Copy link
Member

@ildyria ildyria commented Mar 16, 2026

Summary by CodeRabbit

Release Notes

  • Performance Improvements

    • Photo navigation within the same album now loads only the targeted photo, avoiding full album reloads and improving responsiveness.
  • Chores

    • Debug logging is now controllable via a runtime flag for better configuration management.

@ildyria ildyria requested a review from a team as a code owner March 16, 2026 15:34
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

📝 Walkthrough

Walkthrough

These changes span two Vue components: adding runtime control for debug logging in the pagination component, and optimizing album-to-photo navigation by detecting same-album transitions to load individual photos without triggering a full album reload.

Changes

Cohort / File(s) Summary
Debug Logging Control
resources/js/components/pagination/PaginationInfiniteScroll.vue
Added conditional check on LycheeState.is_debug_enabled to gate console.debug output in handleIntersect method, making debug logging controllable via runtime flag.
Album Navigation Optimization
resources/js/views/gallery-panels/Album.vue
Enhanced route-watch logic with oldAlbumId tracking to detect same-album transitions and load only photo data without full album reload; includes early return for photo-only changes within the same album.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A rabbit hops through galleries with glee 🐰
Debug logs dance when they're meant to be!
Photos pop swift when the album stays same,
No full reload—efficiency's the game,
Scroll optimized, navigation so bright,
This debugging dance feels just right! 🐇

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

You can customize the tone of the review comments and chat replies.

Configure the tone_instructions setting to customize the tone of the review comments and chat replies. For example, you can set the tone to Act like a strict teacher, Act like a pirate and more.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
resources/js/views/gallery-panels/Album.vue (1)

515-516: Track the TODO with an issue reference.

Consider linking this TODO to an issue/ID so the pagination-edge prefetch follow-up is discoverable and doesn’t get lost.

If you want, I can draft a concrete issue description and acceptance criteria for this TODO.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a4fdb21d-516f-4bce-b082-8ec0a11d0511

📥 Commits

Reviewing files that changed from the base of the PR and between b7948a9 and 236edc8.

📒 Files selected for processing (2)
  • resources/js/components/pagination/PaginationInfiniteScroll.vue
  • resources/js/views/gallery-panels/Album.vue

@ildyria ildyria merged commit 7c595a4 into master Mar 16, 2026
44 of 45 checks passed
@ildyria ildyria deleted the some-photo-do-not-open branch March 16, 2026 16:35
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