From 274c97acbe7470cfa8a83622e9b061d4e33aa9b4 Mon Sep 17 00:00:00 2001 From: Matt LaPaglia Date: Sat, 31 Oct 2026 10:55:07 -0400 Subject: [PATCH 1/5] feat(lightbox): play live photos from a dock button in v7 and v8 Hide the LivePhotosKit LIVE badge in the main lightbox and add a play/stop toggle to the dock. While on, a muted looping video of the clip plays over the still until the button is turned off. Viewers without edit rights get a dock with only this button. Flow and Moderation keep the native controls. Spec impact: FR-100-06, S-100-25, S-100-26, UI-100-04 added to feature 100 --- .../features/100-google-motion-photos/plan.md | 7 ++ .../features/100-google-motion-photos/spec.md | 24 +++- .../100-google-motion-photos/tasks.md | 17 ++- docs/specs/4-architecture/knowledge-map.md | 1 + .../photo/useLivePhotoToggle.test.ts | 97 ++++++++++++++++ .../composables/photo/useLivePhotoToggle.ts | 59 ++++++++++ resources/js/stores/PhotoState.ts | 13 +++ .../components/gallery/photoModule/Dock.vue | 107 ++++++++++-------- .../gallery/photoModule/PhotoBox.vue | 37 +++++- .../gallery/photoModule/PhotoPanel.vue | 7 +- .../components/gallery/photoModule/Dock.vue | 64 +++++++---- .../gallery/photoModule/PhotoBox.vue | 30 ++++- .../gallery/photoModule/PhotoPanel.vue | 14 ++- 13 files changed, 391 insertions(+), 86 deletions(-) create mode 100644 resources/js/composables/photo/useLivePhotoToggle.test.ts create mode 100644 resources/js/composables/photo/useLivePhotoToggle.ts diff --git a/docs/specs/4-architecture/features/100-google-motion-photos/plan.md b/docs/specs/4-architecture/features/100-google-motion-photos/plan.md index 2632f23374c..e0d35764de5 100644 --- a/docs/specs/4-architecture/features/100-google-motion-photos/plan.md +++ b/docs/specs/4-architecture/features/100-google-motion-photos/plan.md @@ -75,6 +75,9 @@ After T-100-15, during T-100-16, compare every FR/NFR/S-ID against the tests nam - _Commands:_ `php artisan test --filter=PhotosAddHandlerImagickTest`. 10. **I10 – Docs + drift gate** - _Steps:_ knowledge map, `1-concepts/photos.md`, `request-lifecycle-photo-upload.md`, roadmap; drift gate report. +11. **I14 – Lightbox live button in the dock, v8 then v7** (FR-100-06, S-100-25, S-100-26, UI-100-04) + - _Steps:_ failing Vitest `useLivePhotoToggle.test.ts` (play, stop, restart on `ended` while playing, no restart after stop, detach resets) → composable; `PhotoBox` augments with `showsNativeControls: false` in the main lightbox and registers `LivePhotoControls` in `PhotoState`; `Dock` live button; `PhotoPanel` shows the dock to non-editors when controls are registered. + - _Commands:_ `npx vp test useLivePhotoToggle`, `npx vp check` (no `--fix`), `npx vp run typecheck`; manual check in the lightbox on an Apple and a Google live photo. ## Scenario Tracking @@ -93,6 +96,7 @@ After T-100-15, during T-100-16, compare every FR/NFR/S-ID against the tests nam | S-100-11 … 14 | I6 / T-100-10 | `ExtractMotionPhotosTest` | | S-100-15 … 18 | I8 / T-100-13, T-100-14 | `useMotionHover.test.ts` + manual | | S-100-19, 20 | I8 / T-100-13, T-100-17 | `useMotionHover.test.ts` + manual per view | +| S-100-25, 26 | I14 / T-100-23 … T-100-26 | `useLivePhotoToggle.test.ts` + manual | ## Analysis Gate @@ -120,6 +124,9 @@ Run 2026-10-17 by the agent (owner review pending). - v7 grid playback, if requested. ## Intent Log +- 2026-10-31: owner reported the motion did not loop until the button was turned off, and that Firefox highlighted the button without playing. Agent probed LivePhotosKit in Chromium with Playwright (Firefox would not start in the sandbox; running it outside was declined), found the gap-after-`ended` and the stall on non-Apple clips, and switched the dock path to a looping `