diff --git a/apps/web/src/ui/CameraDock.tsx b/apps/web/src/ui/CameraDock.tsx index 418a828..2bbb768 100644 --- a/apps/web/src/ui/CameraDock.tsx +++ b/apps/web/src/ui/CameraDock.tsx @@ -12,10 +12,10 @@ import { createPlatformSocket } from "../lib/platform-ws.js"; // chips in the device footer; docked bottom-right, the first opened rightmost and each // next one to its left. A tile rests on the camera's newest entry/exit snapshot and // switches to live video while that camera is seeing a vehicle (the server's per-camera -// activity, pushed over /api/ws). Clicking the picture opens a large view that streams -// LIVE ON DEMAND (car or no car) with a Live / Snapshot switch; closing it returns the -// tile to automatic — a stream the user started stops, one the camera started carries -// on. Live frames come over their own socket as JPEG binaries; only the newest frame is +// activity, pushed over /api/ws). Clicking the picture opens a large view in the +// tile's state (live if the tile is live, else the snapshot), with a Live / Snapshot +// switch that streams LIVE ON DEMAND, car or no car; closing it returns the tile to +// automatic — a stream the user started stops, one the camera started carries on. Live frames come over their own socket as JPEG binaries; only the newest frame is // shown, and the tile and the large view share that one socket. Advisory viewing — // nothing here gates anything. @@ -75,7 +75,7 @@ function CameraTile({ const { t } = useTranslation(); /** The camera is reporting a vehicle (server-side activity, 30 s after its last push). */ const active = useLiveStore((s) => s.activeCameras[deviceId] === true); - /** Large view open, and what the user picked in it (opens on "live"). */ + /** Large view open, and what it shows (opens in the tile's state, then the user's pick). */ const [expanded, setExpanded] = useState(false); const [modalMode, setModalMode] = useState<"live" | "snapshot">("live"); // Modal open → the user's choice rules; closed → automatic (live while a vehicle is in view). @@ -120,11 +120,13 @@ function CameraTile({ ✕ - {/* The picture is the expand control: a click opens the large view, live. */} + {/* The picture is the expand control: the large view opens showing what the tile + shows. Seeded from `active`, not from "a frame has arrived", so a camera-started + stream that is still connecting is not torn down by the click. */}