Skip to content

fix(network): enforce one active link and persist ethernet-off intent - #310

Merged
gmmcosta15 merged 7 commits into
refactor/network-extract-helpersfrom
fix/network-single-link-exclusivity
Sep 28, 2026
Merged

gmmcosta15 merged 7 commits into
refactor/network-extract-helpersfrom
fix/network-single-link-exclusivity

Conversation

@gmmcosta15

Copy link
Copy Markdown
Collaborator

Description

  • Bug fix

Stacked on #3, review after it merges.

Highest review value in the stack, this is where the field bugs were. Enforces exactly one of Wi-Fi/ethernet/hotspot active at a time, on user toggles only. Background/automatic state handlers never drop a link behind the user's back.

  • _set_wired_profiles_autoconnect, _ensure_wired_autoconnect
  • Exclusivity logic in manager.py/worker.py
  • networkWindow.py toggle handlers + loading guard armed before link changes

Tests

All 5 gates pass standing alone.

…/boot/VLAN, keep saved profile on failed add
# Description
- [x] Code refactor

Stacked on #2, review after it merges.

Behaviour-neutral motion only, extracts helpers to cut cyclomatic
complexity below the C901 threshold (10). Reviewable as pure motion.

- Extract `_gather_ap_properties`, `_gather_settings`, `_vlan_*`,
`_prefix_to_mask`, `_parse_ipv4_settings`, `_unwrap`, `_setting`,
`_delete_connections_where`, `_delete_all_connections_by_id`,
`_find_ap_props`, `_reload_connections`
- `models.py` cleanup

# Tests
All 5 gates pass standing alone, including `ruff check --select C901`
over the network layer. No behaviour change (pure extraction).
@gmmcosta15
gmmcosta15 merged commit 46f4045 into dev Sep 28, 2026
6 checks passed
An error occurred while trying to automatically change base from refactor/network-extract-helpers to dev September 28, 2026 09:27
@gmmcosta15
gmmcosta15 deleted the fix/network-single-link-exclusivity branch September 29, 2026 08:15
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