Skip to content

frontend: settings: make user reboot after reset settings operation#3870

Merged
patrickelectric merged 2 commits intobluerobotics:masterfrom
nicoschmdt:reset-settings-fix
Apr 9, 2026
Merged

frontend: settings: make user reboot after reset settings operation#3870
patrickelectric merged 2 commits intobluerobotics:masterfrom
nicoschmdt:reset-settings-fix

Conversation

@nicoschmdt
Copy link
Copy Markdown
Contributor

@nicoschmdt nicoschmdt commented Apr 8, 2026

fix: #1723

Since the success message of reset settings is to restart the system I changed the requested reload page button to reboot.

image

Summary by Sourcery

Enhancements:

  • Make the reset-settings success dialog persistent and replace the close action with a reboot action that initiates a system restart.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Apr 8, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Update the Settings reset confirmation flow so that after resetting settings, the user is prompted with a non-dismissible dialog that now triggers a system reboot instead of simply closing the dialog, using the commander store’s shutdown API.

Sequence diagram for reset settings confirmation and reboot

sequenceDiagram
  actor User
  participant SettingsView
  participant CommanderStore as commander

  User->>SettingsView: Click ResetSettings
  activate SettingsView
  SettingsView->>SettingsView: Perform_reset_settings
  SettingsView->>SettingsView: show_reset_dialog = true
  deactivate SettingsView

  User->>SettingsView: Click Reboot button
  activate SettingsView
  SettingsView->>CommanderStore: shutdown(ShutdownType.Reboot)
  deactivate SettingsView

  CommanderStore-->>User: System begins reboot (session ends)
Loading

Class diagram for SettingsView with reboot_system integration

classDiagram
  class SettingsView {
    +boolean show_reset_dialog
    +boolean operation_in_progress
    +reboot_system() void
    +onConfirmClearLogs() void
    +remove_service_log_files() Promise~void~
  }

  class CommanderStore {
    +shutdown(type ShutdownType) void
  }

  class ShutdownType {
    <<enumeration>>
    +Reboot
    +Shutdown
  }

  SettingsView ..> CommanderStore : uses
  SettingsView ..> ShutdownType : uses
Loading

File-Level Changes

Change Details Files
Make the reset-settings success dialog non-dismissible and change its primary action from closing to triggering a system reboot.
  • Add the persistent prop to the reset dialog so it cannot be dismissed by clicking outside or pressing escape.
  • Replace the dialog’s Close text button with a primary button that triggers a reboot action and displays an mdi-restart-alert icon with the label Reboot.
  • Introduce a reboot_system method on the Settings view component that calls the commander store’s shutdown function with ShutdownType.Reboot.
  • Import the commander store and ShutdownType enum to support the reboot behavior.
core/frontend/src/views/SettingsView.vue

Assessment against linked issues

Issue Objective Addressed Explanation
#1723 After a successful 'reset settings' operation, display a clear feedback message/dialog indicating that the reset succeeded. The PR does not add or modify any success message or feedback text for the reset settings operation; it only changes the dialog behavior (persistent) and the button action (reboot). If a feedback message was missing before, it remains unaddressed in this diff.
#1723 Make the post-reset feedback dialog inescapable and require the user to perform a mandatory follow-up action (reload/reboot) instead of simply closing it.

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:

  • Since the dialog is now persistent and the only action is reboot_system, consider handling potential shutdown failures (e.g., via Notifier and optionally allowing the dialog to be closed) so users aren’t stuck if the reboot command cannot be executed.
  • You may want to disable the reboot button after it’s clicked (or while a shutdown request is in flight) to avoid multiple rapid commander.shutdown calls being sent.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since the dialog is now persistent and the only action is `reboot_system`, consider handling potential shutdown failures (e.g., via `Notifier` and optionally allowing the dialog to be closed) so users aren’t stuck if the reboot command cannot be executed.
- You may want to disable the reboot button after it’s clicked (or while a shutdown request is in flight) to avoid multiple rapid `commander.shutdown` calls being sent.

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.

@joaoantoniocardoso
Copy link
Copy Markdown
Member

We should backport it to 1.4

@patrickelectric patrickelectric merged commit 4d8eee9 into bluerobotics:master Apr 9, 2026
7 checks passed
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.

Dialogue after 'reset settings' takes forever to popup

3 participants