Skip to content

Video Manager: Check default route ip for RTSP availability#3893

Merged
patrickelectric merged 2 commits intobluerobotics:masterfrom
ES-Alexander:rtsp-check-default-route-ip
Apr 24, 2026
Merged

Video Manager: Check default route ip for RTSP availability#3893
patrickelectric merged 2 commits intobluerobotics:masterfrom
ES-Alexander:rtsp-check-default-route-ip

Conversation

@ES-Alexander
Copy link
Copy Markdown
Collaborator

@ES-Alexander ES-Alexander commented Apr 24, 2026

@dgudiel reported that the existing error display check was giving a false positive for a default, working RadCam setup:

image

This PR includes the default route (0.0.0.0) in that check, and clarifies the error message for when it does occur.

Summary by Sourcery

Improve video diagnostic handling of RTSP stream availability for default-routed cameras.

Bug Fixes:

  • Account for RTSP streams bound to the default route (0.0.0.0) when determining if any camera streams are accessible.

Enhancements:

  • Clarify the user-facing error message shown when no accessible video streams are detected.

Note

Low Risk
Low risk UI/diagnostic logic tweak that only affects when the Video Manager shows a warning; no auth, persistence, or backend behavior changes.

Overview
Updates VideoDiagnosticHelper.vue to treat RTSP endpoints using the default route (rtsp://0.0.0.0) as accessible in addition to the vehicle IP, reducing false “no stream accessible” warnings.

Rewords the warning text to more clearly indicate that streams may simply not be configured to reach the client IP.

Reviewed by Cursor Bugbot for commit b2a8764. Bugbot is set up for automated code reviews on this repo. Configure here.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 24, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the video diagnostic helper to consider RTSP streams bound to the default route (0.0.0.0) as accessible and refines the user-facing error message about unavailable video streams.

Flow diagram for RTSP accessibility check including default route

flowchart TD
  A[Compute all_streams from video.available_streams] --> B[Iterate over each stream endpoint]
  B --> C[Lowercase endpoint to route]
  C --> D{route startsWith rtsp://vehicle_ip_address?}
  D -- Yes --> H[Mark endpoint as accessible]
  D -- No --> E{route startsWith rtsp://0.0.0.0?}
  E -- Yes --> H[Mark endpoint as accessible]
  E -- No --> F[Ignore endpoint for RTSP accessibility]

  H --> G[Collect accessible RTSP endpoints]
  F --> B
  G --> I{Any accessible RTSP endpoints?}
  I -- Yes --> J[has_accessible_rtsp_streams returns true]
  I -- No --> K[has_accessible_rtsp_streams returns false]
Loading

File-Level Changes

Change Details Files
Broaden RTSP accessibility check to treat streams bound to the default route (0.0.0.0) as valid.
  • Extend RTSP stream filter predicate to match endpoints starting with the vehicle IP or 0.0.0.0
  • Keep overall logic of checking for any matching RTSP streams via non-empty filtered list
core/frontend/src/components/video-manager/VideoDiagnosticHelper.vue
Clarify the diagnostic error message shown when no accessible video streams are detected for the user's IP.
  • Reword the alert text to emphasize configuration/availability of streams rather than generic inaccessibility from the device IP
  • Retain conditional guidance shown when the user is connected to Wi‑Fi for non-piloting purposes
core/frontend/src/components/video-manager/VideoDiagnosticHelper.vue

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The has_accessible_rtsp_streams logic would be clearer and more efficient if you used .some(...) instead of filter(...).isEmpty() for checking existence, matching the intent directly.
  • Consider extracting the RTSP route matching (checking for vehicle_ip_address or 0.0.0.0) into a small helper function to avoid inlining this logic and make future adjustments easier.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `has_accessible_rtsp_streams` logic would be clearer and more efficient if you used `.some(...)` instead of `filter(...).isEmpty()` for checking existence, matching the intent directly.
- Consider extracting the RTSP route matching (checking for `vehicle_ip_address` or `0.0.0.0`) into a small helper function to avoid inlining this logic and make future adjustments easier.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ES-Alexander ES-Alexander force-pushed the rtsp-check-default-route-ip branch from b2a8764 to bec4f23 Compare April 24, 2026 03:15
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 24, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@joaoantoniocardoso
Copy link
Copy Markdown
Member

Since you are editing this, we could add support to the other rtsp kinds as well, which would also show as not reachable today.

@joaoantoniocardoso joaoantoniocardoso added the move-to-stable Needs to be cherry-picked and move to stable label Apr 24, 2026
@ES-Alexander
Copy link
Copy Markdown
Collaborator Author

@joaoantoniocardoso such as…?

I’m not familiar with the possible options - just had an easy target of working IP with a false positive error message 😅

@patrickelectric
Copy link
Copy Markdown
Member

Since you are editing this, we could add support to the other rtsp kinds as well, which would also show as not reachable today.

This can be done in another PR and an issue can be raised.

@patrickelectric patrickelectric merged commit 279476b into bluerobotics:master Apr 24, 2026
7 checks passed
@ES-Alexander ES-Alexander deleted the rtsp-check-default-route-ip branch April 24, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

move-to-stable Needs to be cherry-picked and move to stable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants