frontend: Add new settings page#3756
Merged
patrickelectric merged 1 commit intobluerobotics:masterfrom Feb 5, 2026
Merged
Conversation
Reviewer's GuideImplements a dedicated Settings page view with sections for appearance, advanced mode, data management, and system tools, moves existing log management and reset/wizard actions from the header dialog into this new page, wires it to the router, and changes the settings button to navigate to the new route with improved UX elements like overlays, snackbars, and periodic log size refresh. Sequence diagram for log deletion streaming on the Settings pagesequenceDiagram
actor User
participant SettingsView
participant BackAxios
participant CommanderAPI
User->>SettingsView: Click Clear System Logs
SettingsView->>SettingsView: prepare_operation Resetting description
SettingsView->>SettingsView: init deletion state
SettingsView->>BackAxios: POST /commander/v1.0/services/remove_log_stream
BackAxios->>CommanderAPI: HTTP POST remove_log_stream
loop Streamed deletion updates
CommanderAPI-->>BackAxios: text chunks with JSON entries
BackAxios-->>SettingsView: onDownloadProgress event
SettingsView->>SettingsView: parseStreamingResponse
SettingsView->>SettingsView: update current_deletion_path
SettingsView->>SettingsView: update current_deletion_total_size
end
CommanderAPI-->>BackAxios: final response end
BackAxios-->>SettingsView: request resolved
SettingsView->>SettingsView: clear deletion state
SettingsView->>BackAxios: GET /commander/v1.0/services/check_log_folder_size
BackAxios->>CommanderAPI: HTTP GET check_log_folder_size
CommanderAPI-->>BackAxios: folder size bytes
BackAxios-->>SettingsView: size response
SettingsView->>SettingsView: update log_size_bytes and log_folder_size
alt Error during deletion
CommanderAPI-->>BackAxios: error response
BackAxios-->>SettingsView: throw error
SettingsView->>SettingsView: set operation_error and show_error
end
Class diagram for the new SettingsView and related componentsclassDiagram
class SettingsView {
+settings any
+disable_remove boolean
+disable_remove_mavlink boolean
+log_folder_size string
+mavlink_log_folder_size string
+show_reset_dialog boolean
+show_reset_warning boolean
+show_error boolean
+operation_in_progress boolean
+operation_description string
+operation_error string
+deletion_in_progress boolean
+deletion_log_abort_controller AbortController
+current_deletion_path string
+current_deletion_size number
+current_deletion_total_size number
+current_deletion_status string
+log_size_bytes number
+mavlink_size_bytes number
+fetch_task OneMoreTime
+resetWarningMessage() string
+log_size_warning() boolean
+mavlink_size_warning() boolean
+prepare_operation(description string) void
+formatSize(bytes number) string
+download_service_log_files() Promise
+download_mavlink_log_files() Promise
+get_log_folder_size() Promise
+get_mavlink_log_folder_size() Promise
+confirm_reset_settings() void
+onConfirmResetSettings() void
+reset_settings() Promise
+remove_service_log_files() Promise
+remove_mavlink_log_files() Promise
+enable_wizard() Promise
}
class SettingsMenu {
+openSettings() void
}
class Notifier {
+service any
+constructor(service any)
+pushBackError(code string, error any) void
}
class OneMoreTime {
+delay number
+disposeWith any
+constructor(config any)
+setAction(action any) void
}
class SettingsLibrary {
+is_dark_theme boolean
+is_pirate_mode boolean
+is_dev_mode boolean
}
class BagStore {
+setData(key string, payload any) Promise
}
class BackAxios {
+request(config any) Promise
}
class StreamingUtils {
+parseStreamingResponse(response string) any
}
class Router {
+push(path string) void
}
SettingsView --> SettingsLibrary : uses
SettingsView --> Notifier : uses
SettingsView --> OneMoreTime : owns
SettingsView --> BagStore : uses
SettingsView --> BackAxios : uses
SettingsView --> StreamingUtils : uses
SettingsMenu --> Router : uses
SettingsMenu --> SettingsView : navigates_to
Flow diagram for navigation to the new Settings route and periodic log size refreshflowchart LR
User[User] --> SettingsButton[SettingsMenu_button]
SettingsButton -->|click openSettings| Router[VueRouter]
Router -->|push /settings| SettingsView[SettingsView_component]
subgraph SettingsPage
SettingsView --> OneMoreTimeTask[OneMoreTime_fetch_task]
OneMoreTimeTask -->|every 30s| GetSystemLogSize[GET services/check_log_folder_size]
OneMoreTimeTask -->|every 30s| GetMavlinkLogSize[GET services/check_mavlink_log_folder_size]
GetSystemLogSize --> CommanderAPI[Commander_service_API]
GetMavlinkLogSize --> CommanderAPI
CommanderAPI --> GetSystemLogSize
CommanderAPI --> GetMavlinkLogSize
GetSystemLogSize --> SettingsView
GetMavlinkLogSize --> SettingsView
end
File-Level Changes
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:
- Previously the log deletion AbortController was cancelled when the dialog closed; now that this logic lives in a routed view, consider aborting any in‑progress deletion in a lifecycle hook (e.g. beforeDestroy) to avoid a dangling stream if the user navigates away mid‑operation.
- The 100MB threshold logic for logs (both
log_size_warning/disable_removeand MAVLink equivalents) is duplicated and recalculated inline; extracting this to a small shared constant/helper would make the limit easier to change and reduce repetition.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Previously the log deletion AbortController was cancelled when the dialog closed; now that this logic lives in a routed view, consider aborting any in‑progress deletion in a lifecycle hook (e.g. beforeDestroy) to avoid a dangling stream if the user navigates away mid‑operation.
- The 100MB threshold logic for logs (both `log_size_warning`/`disable_remove` and MAVLink equivalents) is duplicated and recalculated inline; extracting this to a small shared constant/helper would make the limit easier to change and reduce repetition.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
11ed8b5 to
6af329f
Compare
joaoantoniocardoso
approved these changes
Feb 4, 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.
Necessary for us to have more advanced configuration of the system
Summary by Sourcery
Introduce a dedicated settings page and route, moving existing settings controls from the header dialog into a full-page view with improved layout and UX.
New Features:
Enhancements: