From 81f0164e9c289b7d8cf4647261d6a346d6a7caa6 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 16 Mar 2026 12:05:26 +0000 Subject: [PATCH] fix: show motion dot regardless of liveReady in grid callback path The motionVisible condition gated the external dot (via onActiveMotionChange callback) on liveReady, causing the dot to stay hidden for cameras in continuous mode (showStillWithoutActivity=false) while the stream is loading or reconnecting. Since the parent (DraggableGridLayout) renders the dot outside the stream viewport, it should reflect actual motion state without depending on stream load status. Simplify the callback-path effect to use !!(autoLive && !offline && activeMotion) so the dot appears in the grid card whenever motion is active. The full condition (including liveReady) is still used for the inline dot rendered inside LivePlayer when no callback is provided. https://claude.ai/code/session_019B4dJXtcxvHn97ZaqHUB62 --- web/src/components/player/LivePlayer.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/web/src/components/player/LivePlayer.tsx b/web/src/components/player/LivePlayer.tsx index 9d4fcb1cb..cda25d5cc 100644 --- a/web/src/components/player/LivePlayer.tsx +++ b/web/src/components/player/LivePlayer.tsx @@ -301,15 +301,13 @@ export default function LivePlayer({ onLoadingChangeRef.current?.(loading); }, [cameraEnabled, offline, showStillWithoutActivity, isReEnabling, liveReady]); + // When the parent manages the dot via callback (grid view), show motion + // without gating on liveReady — the dot should reflect actual motion state + // regardless of stream load status to avoid the dot not appearing for + // cameras in continuous mode while the stream is reconnecting. useEffect(() => { - const motionVisible = !!( - autoLive && - !offline && - activeMotion && - ((showStillWithoutActivity && !liveReady) || liveReady) - ); - onActiveMotionChangeRef.current?.(motionVisible); - }, [autoLive, offline, activeMotion, showStillWithoutActivity, liveReady]); + onActiveMotionChangeRef.current?.(!!(autoLive && !offline && activeMotion)); + }, [autoLive, offline, activeMotion]); if (!cameraConfig) { return ;