Skip to content

core: frontend: wifi: Freeze network list on hover - #4348

Draft
patrickelectric wants to merge 1 commit into
bluerobotics:masterfrom
patrickelectric:fix-wifi-list-hover
Draft

core: frontend: wifi: Freeze network list on hover#4348
patrickelectric wants to merge 1 commit into
bluerobotics:masterfrom
patrickelectric:fix-wifi-list-hover

Conversation

@patrickelectric

Copy link
Copy Markdown
Member

The scan replaces the list every 20s and the row jumps under the pointer.
Fix #637

@github-actions

Copy link
Copy Markdown

Automated PR Review

0. Summary

  • Verdict: MINOR SUGGESTIONS ✏️

Freezes the wifi network list under the cursor by snapshotting filtered_networks on mouseenter and rendering the snapshot until mouseleave, so the 20 s rescan no longer makes rows jump under the pointer (fixes #637). Small, well-scoped Vue 2 change confined to WifiManager.vue.

1. Correctness & Implementation Bugs

  • 1.1 [minor] core/frontend/src/components/wifi/WifiManager.vue:69 — the v-if="!filtered_networks.isEmpty()" guard still keys off filtered_networks, while the v-for inside it iterates displayed_networks. Concretely: if the user is hovering the (frozen) list and the next scan returns zero networks, this branch flips to the v-else "No wifi networks available / Rescanning..." block and the frozen list vanishes — which is exactly the jump the PR is trying to eliminate. Conversely, if the frozen snapshot is empty and a scan later populates the list, the guard becomes truthy but the loop is over an empty displayed_networks and nothing renders. Gate the guard on displayed_networks (or drop the guard and let v-for render nothing) so the visible list and its emptiness check agree.
  • 1.2 [minor] core/frontend/src/components/wifi/WifiManager.vue:214filtered_networks can be undefined (connectable_networks is undefined until the first scan lands). freezeList() then stores undefined into frozen_networks, so a mouseenter that happens during the initial spinner-window makes displayed_networks return undefined while hovering_list is true. In practice the mouseenter can't fire until the sheet is visible, so this is unlikely, but you can make it robust by early-returning from freezeList() when filtered_networks == null (leave hovering_list false so the live list keeps rendering).

5. UI / UX

  • 5.1 [nit] @mouseenter/@mouseleave are pointer-only. On touch devices there is no hover, but on those devices the user is also typically tapping (which will still race the 20 s rescan). Not something to fix in this PR, just worth being aware of — a scroll-based freeze (@scroll) would additionally cover the touch case.

6. Code Quality & Style

  • 6.1 [nit] core/frontend/src/components/wifi/WifiManager.vue:242freezeList() sets state that logically belongs together with the mouseleave handler; the inline @mouseleave="hovering_list = false" splits the pair across template and script. A tiny unfreezeList() method would keep the two sides symmetric and make the intent grep-able, but the current form is fine.

Generated by PR Review Bot. This is advisory, a human reviewer must still approve.

The scan replaces the list every 20s and the row jumps under
the pointer.

Fix bluerobotics#637

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
@patrickelectric
patrickelectric requested a review from a team August 29, 2026 02:23
@patrickelectric patrickelectric added the move-to-stable Needs to be cherry-picked and move to stable label Aug 31, 2026
@patrickelectric

patrickelectric commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

As discussed, we should have a small banner saying that the update is in hold. Maybe add a manual reload wifi list

@patrickelectric
patrickelectric marked this pull request as draft September 3, 2026 16:04
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.

core: frontend: wifi: Do not update the wifi list if the mouse hovers over it

1 participant