Skip to content

Add navigation album menu - #4657

Open
ildyria wants to merge 1 commit into
masterfrom
album-menu
Open

Add navigation album menu#4657
ildyria wants to merge 1 commit into
masterfrom
album-menu

Conversation

@ildyria

@ildyria ildyria commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added responsive album navigation with thumbnails, nested folders, active-album highlighting, accordion controls, and RTL support.
    • Added navigation-panel toggling alongside album content.
    • Improved thumbnail selection for HiDPI displays.
  • Bug Fixes
    • Improved handling of errors returned during file or image requests, including clearer messages and fewer unnecessary error overlays.
    • Refreshed album listings more reliably after album or user data updates.
    • Corrected empty-state behavior across pinned, regular, and shared album views.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The changes normalize Axios Blob errors and suppress global overlays for Blob requests. The gallery gains responsive album navigation, density-aware thumbnails, updated layout conditions, and album-list invalidation during refresh.

Changes

Axios error normalization

Layer / File(s) Summary
Blob error processing
resources/js/config/axios-config.ts
Blob error bodies are parsed as JSON when possible. The interceptor uses normalized data and excludes Blob requests from global error events.

Album navigation

Layer / File(s) Summary
Navigation component and thumbnail selection
resources/js/v8/components/gallery/albumModule/AlbumNavPanel.vue, resources/js/v8/components/thumbs/Thumb.vue
The new navigation panel renders recursive album routes with active-state, RTL, and responsive behavior. Thumbnails select thumb2x or thumb based on device pixel ratio when no type is provided.
Gallery layout and album-list refresh
resources/js/v8/components/gallery/albumModule/AlbumPanel.vue, resources/js/v8/views/gallery-panels/Albums.vue, resources/js/v8/views/gallery-panels/Album.vue
Album views place navigation beside gallery content. Refresh flows invalidate the album-list store, and :is-alone conditions are updated.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: 🟡 Moderate · up to ae69d

The new album navigation can display outdated titles, hierarchy, or covers after a refresh, while its controls do not follow the repository’s required UI component convention; merge should wait for these bounded issues to be addressed or explicitly accepted.

Poem

I hop through albums, row by row,
With bright thumb2x lights aglow.
Blob errors parse, overlays hide,
Fresh lists bloom on every stride.
The rabbit cheers the panels wide!

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (5 skipped: 5 unsupported.)

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.

@ildyria
ildyria changed the base branch from album-listing-v3-bis to spotlight-search August 22, 2026 21:40
@ildyria
ildyria marked this pull request as ready for review August 22, 2026 21:42
@ildyria
ildyria requested a review from a team as a code owner August 22, 2026 21:42

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
resources/js/v8/views/gallery-panels/Albums.vue (1)

240-245: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Reload the album navigation after invalidation.

invalidate() only clears isLoaded. It retains rows and tree. AlbumNavPanel calls ensureLoaded() only when it mounts. A refresh in a mounted view therefore keeps stale album titles, hierarchy, and covers in the navigation menu.

  • resources/js/v8/views/gallery-panels/Albums.vue#L240-L245: Call albumListStore.ensureLoaded() after invalidate(). Use the same reload helper from onLoggedIn() so a guest-loaded menu refreshes after authentication.
  • resources/js/v8/views/gallery-panels/Album.vue#L228-L231: Call albumListStore.ensureLoaded() after invalidate().

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4e96a562-c6fa-42b8-9bf2-cd0e4f7e96c7

📥 Commits

Reviewing files that changed from the base of the PR and between 35e1062 and ae69de3.

📒 Files selected for processing (6)
  • resources/js/config/axios-config.ts
  • resources/js/v8/components/gallery/albumModule/AlbumNavPanel.vue
  • resources/js/v8/components/gallery/albumModule/AlbumPanel.vue
  • resources/js/v8/components/thumbs/Thumb.vue
  • resources/js/v8/views/gallery-panels/Album.vue
  • resources/js/v8/views/gallery-panels/Albums.vue

Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.

Comment on lines +14 to +23
async function extractErrorData(data: unknown): Promise<{ message?: string } & Record<string, unknown>> {
if (typeof Blob !== "undefined" && data instanceof Blob) {
try {
return JSON.parse(await data.text()) as { message?: string };
} catch (_error) {
return {};
}
}
return (data ?? {}) as { message?: string };
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Guard parsed Blob error data before reading data.message.

A valid JSON null, array, or primitive Blob payload can be returned from JSON.parse, causing the response interceptor to throw a TypeError when it accesses data.message and masking the original Axios error. Return {} unless the parsed value is a non-null, non-array object.

📍 Affects 1 file
  • resources/js/config/axios-config.ts#L14-L23 (this comment)
  • resources/js/config/axios-config.ts#L77-L84

Comment thread resources/js/v8/components/gallery/albumModule/AlbumNavPanel.vue
@ildyria ildyria added the v8 label Aug 22, 2026
Base automatically changed from spotlight-search to master August 23, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant