From 56cc253009eb192a3acd3e3098c9ab3e53b05abb Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 3 Jun 2026 22:50:03 -0400 Subject: [PATCH] feat(gallery): reveal tiles on image load + single initial fetch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 5×10 metadata batching only staggered the cheap layer (JSON); thumbnails load as independent requests and clustered, so tiles "popped in together" after a wait. Two changes: - GalleryItem reveals each tile when ITS OWN thumbnail fires @load (with an onMounted complete-check for cached thumbs), playing a showcase-style flip-up entrance. Tiles now cascade in natural load order instead of all at once. Honors prefers-reduced-motion. - gallery store does ONE initial fetch (limit=50) instead of 10 serial /scroll round-trips. Fewer RTTs, faster first paint; the reveal-on-load is what makes appearance progressive now. Infinite scroll pulls 25/trigger. Tests: GalleryItem gains is-loaded only after @load; loadInitial issues exactly one scroll request at the initial limit. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/components/gallery/GalleryItem.vue | 49 +++++++++++++++++-- frontend/src/stores/gallery.js | 27 +++++----- frontend/test/components/galleryItem.spec.js | 28 +++++++++++ frontend/test/gallery.spec.js | 15 ++++++ 4 files changed, 100 insertions(+), 19 deletions(-) create mode 100644 frontend/test/components/galleryItem.spec.js diff --git a/frontend/src/components/gallery/GalleryItem.vue b/frontend/src/components/gallery/GalleryItem.vue index 8d9ba13..cab8b9e 100644 --- a/frontend/src/components/gallery/GalleryItem.vue +++ b/frontend/src/components/gallery/GalleryItem.vue @@ -9,11 +9,16 @@ >