BlueOS icon indicating copy to clipboard operation
BlueOS copied to clipboard

frontend: wifi: add refresh wifi list button

Open nicoschmdt opened this issue 4 months ago • 3 comments

fix #1863

image

Refresh: https://github.com/user-attachments/assets/93d98ccc-7d2c-4e47-8589-a8b09eafcc67

Summary by Sourcery

Add a manual refresh button to the WifiManager component and wire it up in the WifiTrayMenu to reload available networks on demand

New Features:

  • Add a refresh icon button to the WifiManager toolbar that emits a refresh-request event
  • Handle the refresh-request in WifiTrayMenu by calling fetchAvailableNetworks on the wifi-updater component

nicoschmdt avatar Jul 24 '25 19:07 nicoschmdt

Reviewer's Guide

Adds a refresh button to the WifiManager toolbar that emits a refresh-request event, and wires it up in the WifiTrayMenu to invoke fetchAvailableNetworks on the wifi-updater component.

Sequence diagram for the WiFi list refresh interaction

sequenceDiagram
    actor User
    participant WifiManager
    participant WifiTrayMenu
    participant WifiUpdater
    User->>WifiManager: Clicks refresh button
    WifiManager->>WifiTrayMenu: emit refresh-request
    WifiTrayMenu->>WifiUpdater: fetchAvailableNetworks()
    WifiUpdater-->>WifiTrayMenu: (updates WiFi list)
    WifiTrayMenu-->>User: Updated WiFi list displayed

File-Level Changes

Change Details Files
Add refresh button and event emission in WifiManager
  • Insert a toolbar button with mdi-refresh icon and click handler
  • Emit 'refresh-request' event on button click
core/frontend/src/components/wifi/WifiManager.vue
Handle refresh-request in WifiTrayMenu
  • Add ref 'wifiUpdater' to wifi-updater component
  • Bind @refresh-request on wifi-manager to onRefreshRequest
  • Implement onRefreshRequest method calling fetchAvailableNetworks via ref
core/frontend/src/components/wifi/WifiTrayMenu.vue

Assessment against linked issues

Issue Objective Addressed Explanation
#1863 Add a 'Refresh WiFi list' button to the WiFi management UI.
#1863 Ensure that clicking the 'Refresh WiFi list' button triggers a refresh of the available WiFi networks.

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

  • Contact our support team for questions or feedback.
  • Visit our documentation for detailed guides and information.
  • Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.

sourcery-ai[bot] avatar Jul 24 '25 19:07 sourcery-ai[bot]

I have attached a video of the current refresh behaviour on the description. I'm not too sure if I like having the message "No wifi networks available" when rescanning but it is a minor nitpick

nicoschmdt avatar Aug 07 '25 20:08 nicoschmdt

@ES-Alexander and @Williangalvani what do you guys think?

nicoschmdt avatar Aug 07 '25 20:08 nicoschmdt