Skip to content

Add front-end - #4719

Open
ildyria wants to merge 4 commits into
feature-64/photos-struct-of-arraysfrom
feature/65/photo-struct-of-array-frontend
Open

Add front-end#4719
ildyria wants to merge 4 commits into
feature-64/photos-struct-of-arraysfrom
feature/65/photo-struct-of-array-frontend

Conversation

@ildyria

@ildyria ildyria commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added a virtualized photo gallery supporting justified, square, masonry, grid, and list layouts.
    • Added on-demand photo detail loading for lightbox and editing workflows.
    • Improved rating-filtered layouts, selection, drag-and-select, and gallery interactions.
    • Added automatic fallback to the existing gallery for filtered or unsupported album views.
    • Added caching and refresh support for photo listing data.
  • Documentation

    • Added Feature 065 specifications, implementation plans, task tracking, and roadmap updates.
    • Documented resolved design questions and known metadata limitations.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Feature 065 adds a flag-gated SoA photo listing path. It introduces v3 photo fetching, tile adaptation, analytic virtualization across five layout modes, on-demand details, virtualized renderers, rating-aware layout, drag-selection geometry, and supporting specification records.

Changes

Photo SoA frontend adoption

Layer / File(s) Summary
Feature specification and implementation records
docs/specs/4-architecture/features/065-photo-listing-struct-of-arrays-adoption/*, docs/specs/4-architecture/open-questions.md, docs/specs/4-architecture/roadmap.md
Adds the Feature 065 plan, specification, task record, decisions, resolved questions, and roadmap status.
Photo v3 data pipeline
resources/js/services/photo-children-v3-service.ts, resources/js/services/album-service.ts, resources/js/stores/AlbumState.ts, resources/js/stores/PhotoState.ts, resources/js/v8/utils/adaptPhotoTile.ts
Adds v3 response types and cached requests. The album store loads buckets and ratios, adapts tiles, fetches bounded details, merges details in place, and preserves v2 fallback behavior.
Analytic layout and virtualized rendering
resources/js/v8/composables/photo/analyticPhotoLayout.ts, resources/js/v8/components/gallery/albumModule/Virtualized/*, resources/js/v8/components/gallery/albumModule/AlbumPanel.vue
Adds five-mode analytic layout, row chunks, sticky bucket headers, virtualized thumbnail and list renderers, and SoA render dispatch.
Drag-selection geometry
resources/js/composables/album/dragAndSelect.ts
Uses analytic photo boxes for SoA albums and retains DOM-based box detection for v2 albums. Rating filters and layout settings affect the computed geometry.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🟡 Moderate · up to 63444

The new SoA gallery can replace filtered results with the full album, initially show incomplete tag data, and block keyboard users from opening non-list tiles. These issues should be resolved before merge, alongside the contradictory verification records.

Poem

A rabbit maps the photo rows,
Five layout paths align,
Details load when tiles need more,
Chunks keep the viewport light,
Selection follows measured bounds,
The garden grid now shines.

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 7 files. (10 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Full details: Docstring Coverage

Explanation

Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 7 files. (10 skipped: 10 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.

* typescript:transform` run in a dev environment), so hand-transcribed here
* from the PHP source directly. Replace with the generated
* `App.Http.Resources.V3.PhotoBucketResource` type once that command has
* been run.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

fix me.

@ildyria
ildyria marked this pull request as ready for review September 7, 2026 14:51
@ildyria
ildyria requested a review from a team as a code owner September 7, 2026 14:51
@ildyria

ildyria commented Sep 7, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@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: 9


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 88d877ad-f859-4f70-a846-01f5cc5d092b

📥 Commits

Reviewing files that changed from the base of the PR and between 47e33e2 and 63444e7.

📒 Files selected for processing (17)
  • docs/specs/4-architecture/features/065-photo-listing-struct-of-arrays-adoption/plan.md
  • docs/specs/4-architecture/features/065-photo-listing-struct-of-arrays-adoption/spec.md
  • docs/specs/4-architecture/features/065-photo-listing-struct-of-arrays-adoption/tasks.md
  • docs/specs/4-architecture/open-questions.md
  • docs/specs/4-architecture/roadmap.md
  • resources/js/composables/album/dragAndSelect.ts
  • resources/js/services/album-service.ts
  • resources/js/services/photo-children-v3-service.ts
  • resources/js/stores/AlbumState.ts
  • resources/js/stores/PhotoState.ts
  • resources/js/v8/components/gallery/albumModule/AlbumPanel.vue
  • resources/js/v8/components/gallery/albumModule/Virtualized/PhotoGridVirtual.vue
  • resources/js/v8/components/gallery/albumModule/Virtualized/PhotoListItemVirtual.vue
  • resources/js/v8/components/gallery/albumModule/Virtualized/PhotoThumbPanelVirtual.vue
  • resources/js/v8/components/gallery/albumModule/Virtualized/PhotoThumbVirtual.vue
  • resources/js/v8/composables/photo/analyticPhotoLayout.ts
  • resources/js/v8/utils/adaptPhotoTile.ts

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

Comment thread docs/specs/4-architecture/roadmap.md
Comment on lines +379 to +380
if (this.albumId !== requestedAlbumId) {
return;

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Prevent stale unfiltered results from replacing filtered results.

When loadPhotosV3() is pending, a tag or person filter starts a replacement loadPhotos() request for the same album. The album-ID guard remains valid, so the older v3 response can overwrite the filtered photo state. Use a shared photo-load revision for replacement loads in both methods. Apply results and loading-state changes only when the captured revision is current. Do not invalidate concurrent background prepend loads.

Comment on lines +415 to +417
void albumStore.loadPhotoDetails(selectedPhotosIds.value);
}
toggleTag();

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Open the tag dialog after selected-photo details resolve.

When albumStore.isPhotoSoaActive is true, toggleTag() can render the dialog while SoA tiles still contain incomplete tag data. Chain toggleTag from loadPhotoDetails() and return from that branch. The tag dialog reacts to later in-place merges, but delaying the open prevents the initial incomplete state. Keep toggleLicense() unchanged because it does not read photo.license.

Proposed fix
 toggleTag: () => {
 	if (albumStore.isPhotoSoaActive) {
-		void albumStore.loadPhotoDetails(selectedPhotosIds.value);
+		void albumStore.loadPhotoDetails(selectedPhotosIds.value).then(toggleTag);
+		return;
 	}
 	toggleTag();
 },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
void albumStore.loadPhotoDetails(selectedPhotosIds.value);
}
toggleTag();
void albumStore.loadPhotoDetails(selectedPhotosIds.value).then(toggleTag);
return;
}
toggleTag();

Comment on lines +144 to +145
onMounted(async () => {
await initLayouts();

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.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Replace the asynchronous lifecycle callback.

Line 144 uses an async callback and Line 145 uses await. Call initLayouts().then(...) and set ready.value in the callback.

As per coding guidelines: “Do not use await async calls in Vue3, use .then() instead.”

Source: Coding guidelines

@@ -0,0 +1,203 @@
<template>
<a

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Make the tile keyboard reachable.

Line 2 creates an anchor without href. The tile is not reachable by keyboard navigation. Keyboard users cannot open or select photos in non-list layouts.

Add keyboard focus and map Enter and Space to the root click action.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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