Skip to content

feat(network): harden NetworkManager layer for 24/7 reliability - #306

Closed
gmmcosta15 wants to merge 17 commits into
devfrom
fix/network-manager-hardening
Closed

feat(network): harden NetworkManager layer for 24/7 reliability#306
gmmcosta15 wants to merge 17 commits into
devfrom
fix/network-manager-hardening

Conversation

@gmmcosta15

@gmmcosta15 gmmcosta15 commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Feature
  • Bug fix
  • Code refactor

Hardens the network layer for 24/7 operation and makes Wi-Fi recovery reliable enough that a user can always get back online to update. Stays fully async on sdbus signal watching.

  • Enforce one active link at a time (Wi-Fi, ethernet or hotspot), on user toggles only; background handlers never drop a link.
  • Persist ethernet-off intent in the wired profile so an NM restart stops resurrecting the cable.
  • Detect hotspot from NM's 802.11 device mode, not an SSID match, so an externally started AP is no longer reported as a client connection.
  • Recover from stale D-Bus device paths by re-detecting interfaces and retrying the signal map.
  • Arm the loading guard before issuing link changes, fixing a toggle that bounced back OFF during ethernet teardown.
  • Support fully disabling the radio, including rfkill, with a recovery path back to a working link.
  • Classify PSK and unknown auth failures instead of hanging with an empty network list on a wrong password.
  • Full-screen numeric keyboard for IP, mask and gateway fields, restyled to match the UI.
  • Cut complexity (no function above C901 threshold 10) and drop per-poll debug logs that spammed the log directory.

Tests

Coverage: models.py 100%, manager.py 99%, keyboardPage.py 90%, networkWindow.py 87%, worker.py 70%.

Future work

  • Radio-cycling phases (Wi-Fi off/on, rfkill, hotspot return to client mode, static IP rewrite) need a run with console or ethernet access. AP-mode hotspot detection is deployed and does not regress client mode, but its assertion lives in a skipped phase.
  • The toggle-bounce fix is UI-driven and has no automated coverage; needs a manual pass on the screen.
  • Coalesce the redundant _build_signal_map fan-out.
  • Stale-path recovery logs the same warning twice at an identical timestamp; cosmetic.
  • NameOwnerChanged would be a cleaner NM-restart trigger.
  • Structural split of worker.py, still large after the complexity work.

@gmmcosta15

Copy link
Copy Markdown
Collaborator Author

dived into #308, #309 , #310 , #311 , #312

@gmmcosta15 gmmcosta15 closed this Aug 28, 2026
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