Fix thumbnails on vehicle setup page#3853
Merged
joaomariolago merged 2 commits intobluerobotics:masterfrom Mar 27, 2026
Merged
Conversation
Automatically starts continuous thumbnail fetching on mount when both autoplay and register are true. Used in the vehicle setup page tooltip so thumbnails appear on hover without manual interaction.
…with streams Filter out video devices that have no streams configured from the vehicle setup overview, so duplicate sources from the same camera don't appear.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the vehicle setup video overview to only show devices with available streams and enhances VideoThumbnail to support autoplayed thumbnail fetching based on stream availability, avoiding registration and polling for unsupported devices. Sequence diagram for autoplay video thumbnail fetching on vehicle setup hoversequenceDiagram
actor User
participant VehicleSetupPage
participant VideoOverview
participant VTooltip
participant VideoThumbnail
participant VideoService
User->>VehicleSetupPage: Navigate to /vehicle/setup
VehicleSetupPage->>VideoOverview: Render video overview
VideoOverview->>VideoThumbnail: Create instance
Note over VideoOverview,VideoThumbnail: Props: width=280, source=device.source,
Note over VideoOverview,VideoThumbnail: register=streams_for_device[device.name] !== undefined,
Note over VideoOverview,VideoThumbnail: autoplay=true
User->>VTooltip: Hover camera icon
VTooltip->>VideoThumbnail: Mount thumbnail component
VideoThumbnail->>VideoThumbnail: mounted()
VideoThumbnail->>VideoThumbnail: update_task.setAction(updateThumbnail)
alt autoplay enabled and register true
VideoThumbnail->>VideoThumbnail: continuous_mode = true
VideoThumbnail->>VideoService: startGetThumbnailForDevice(source)
else autoplay disabled or register false
VideoThumbnail->>VideoThumbnail: Wait for manual trigger
end
Updated class diagram for VideoOverview and VideoThumbnail componentsclassDiagram
class VideoOverview {
+computed valid_visible_video_devices
+methods available_streams_from_device(video_available_streams, device)
+methods has_supported_encode(device)
}
class VideoThumbnail {
+prop source
+prop width
+prop register
+prop disabled
+prop autoplay
+data continuous_mode
+data stopDebounceTimer
+data update_task
+mounted mounted()
+beforeDestroy beforeDestroy()
+methods updateThumbnail()
}
VideoOverview --> VideoThumbnail : uses
VideoOverview : filters devices
VideoOverview : requires available streams
VideoThumbnail : if autoplay && register
VideoThumbnail : continuous_mode = true
VideoThumbnail : video.startGetThumbnailForDevice(source)
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Changing
widthfrom"280px"to"280"may alter how theVideoThumbnailrenders (string vs number and missing units); double‑check that the underlying component handles bare numeric values correctly and still applies the intended pixel width. - The
:register="streams_for_device[device.name] !== undefined"check assumes undefined is the only non-available state; consider using a more explicit existence check (e.g. key presence or a truthiness test) to avoid edge cases withnullor inherited properties.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Changing `width` from `"280px"` to `"280"` may alter how the `VideoThumbnail` renders (string vs number and missing units); double‑check that the underlying component handles bare numeric values correctly and still applies the intended pixel width.
- The `:register="streams_for_device[device.name] !== undefined"` check assumes undefined is the only non-available state; consider using a more explicit existence check (e.g. key presence or a truthiness test) to avoid edge cases with `null` or inherited properties.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
joaomariolago
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3851
Summary
autoplayprop toVideoThumbnailso thumbnails fetch automatically on mount (used in vehicle setup tooltip on hover)registerprop dynamic based on stream availability instead of hardcodedTest plan
Summary by Sourcery
Update vehicle setup video overview to only show devices with available streams and ensure video thumbnails can autoplay when appropriate.
New Features:
Bug Fixes:
Summary by Sourcery
Update vehicle setup video overview to only show devices with available video streams and enable video thumbnails to autoplay fetching on mount when appropriate.
New Features:
Bug Fixes:
Enhancements: