Skip to content

frontend: components: video-manager: VideoStreamCreationDialog: Fix form state reset#3856

Closed
joaoantoniocardoso wants to merge 1 commit intobluerobotics:1.4from
joaoantoniocardoso:backports/1.4/fix-stream-creation-dialog-reset
Closed

frontend: components: video-manager: VideoStreamCreationDialog: Fix form state reset#3856
joaoantoniocardoso wants to merge 1 commit intobluerobotics:1.4from
joaoantoniocardoso:backports/1.4/fix-stream-creation-dialog-reset

Conversation

@joaoantoniocardoso
Copy link
Member

@joaoantoniocardoso joaoantoniocardoso commented Mar 25, 2026

This is a backport from #3855 into 1.4

Summary by Sourcery

Bug Fixes:

  • Fix stale form state in the video stream creation dialog when reopening it after changes.

…orm state reset

Fix stale form state on dialog reopen by re-syncing all fields from the stream
prop via a watcher.
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 25, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a watcher on the show prop in VideoStreamCreationDialog to reset the form state whenever the dialog is opened, ensuring the form is reinitialized from the current stream data on each open.

Sequence diagram for dialog open triggering form reset in VideoStreamCreationDialog

sequenceDiagram
  actor User
  participant ParentComponent
  participant VideoStreamCreationDialog
  participant Form

  User->>ParentComponent: clickOpenVideoStreamDialog()
  ParentComponent->>VideoStreamCreationDialog: set prop show = true
  activate VideoStreamCreationDialog
  VideoStreamCreationDialog->>VideoStreamCreationDialog: watch show(newVal)
  alt newVal is true
    VideoStreamCreationDialog->>VideoStreamCreationDialog: resetFormFromStream()
    VideoStreamCreationDialog->>Form: initializeFromCurrentStream()
  end
  deactivate VideoStreamCreationDialog
Loading

Class diagram for VideoStreamCreationDialog with show watcher

classDiagram
  class VideoStreamCreationDialog {
    <<VueComponent>>
    +boolean show
    +any settings
    +VForm form
    +resetFormFromStream()
  }

  class VideoStreamCreationDialogWatchers {
    +show(newVal boolean)
  }

  VideoStreamCreationDialog ..> VideoStreamCreationDialogWatchers : watch

  class VForm {
    +initializeFromCurrentStream()
  }

  VideoStreamCreationDialog --> VForm : uses ref form
Loading

File-Level Changes

Change Details Files
Ensure the video stream creation dialog form reinitializes from the current stream whenever the dialog is shown.
  • Introduce a watch section in the Vue component to observe the show prop.
  • Call resetFormFromStream() inside the watcher when show becomes true so the form state is refreshed on open.
core/frontend/src/components/video-manager/VideoStreamCreationDialog.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

@joaoantoniocardoso
Copy link
Member Author

Closing: the watch block already exists on 1.4.

@joaoantoniocardoso joaoantoniocardoso deleted the backports/1.4/fix-stream-creation-dialog-reset branch March 25, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant