Add navigation album menu - #4657
Conversation
📝 WalkthroughWalkthroughThe 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. ChangesAxios error normalization
Album navigation
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: 🟡 Moderate · up to 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
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
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. Comment |
There was a problem hiding this comment.
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 winReload the album navigation after invalidation.
invalidate()only clearsisLoaded. It retainsrowsandtree.AlbumNavPanelcallsensureLoaded()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: CallalbumListStore.ensureLoaded()afterinvalidate(). Use the same reload helper fromonLoggedIn()so a guest-loaded menu refreshes after authentication.resources/js/v8/views/gallery-panels/Album.vue#L228-L231: CallalbumListStore.ensureLoaded()afterinvalidate().
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4e96a562-c6fa-42b8-9bf2-cd0e4f7e96c7
📒 Files selected for processing (6)
resources/js/config/axios-config.tsresources/js/v8/components/gallery/albumModule/AlbumNavPanel.vueresources/js/v8/components/gallery/albumModule/AlbumPanel.vueresources/js/v8/components/thumbs/Thumb.vueresources/js/v8/views/gallery-panels/Album.vueresources/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.
| 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 }; | ||
| } |
There was a problem hiding this comment.
🩺 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
35e1062 to
aa90464
Compare
649ef26 to
7321e50
Compare
Summary by CodeRabbit