Skip to content

network: fix iwd+networkd link classification and disconnect state - #4082

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
hoangm960:fix/iwd-networkd-wifi-state
Nov 2, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
hoangm960:fix/iwd-networkd-wifi-state

Conversation

@hoangm960

Copy link
Copy Markdown
Contributor

Description

Fixes three bugs when using the iwd+networkd backend:

  1. Hotplugged wlan* / wlp* interfaces misclassified as Ethernet: When a wireless interface is created or recreated (e.g. after an iwlwifi firmware reset), systemd-networkd can emit a D-Bus signal before udev sets DEVTYPE=wlan, causing Link.Describe to return "Type": "ether" (ARPHRD_ETHER) on initial enumeration. Check looksWirelessName(l.name) in linkInfo.isWired() and linkInfo.isWireless() so wireless interface names are never classified as wired.
  2. Wi-Fi still shown as connected after disconnecting: When iwd disconnects, Station.ConnectedNetwork is invalidated rather than updated in changed_properties or readable via GetProperty, leaving WiFiSSID and WiFiSignal populated while WiFiConnected is false. Clear WiFiSSID and WiFiSignal when Station.State is not "connected" in IWDBackend, and gate currentWifiSSID / wifiSignalStrength on wifiConnected in DMSNetworkService.qml.
  3. Wi-Fi row shifts right after reconnecting: In NetworkDetail.qml, the connecting DSpinner Loader inside leading did not set visible: active, so QQuickLoader kept its 20x20 layout footprint inside SettingsRow's leadingArea Row after isConnecting became false. Set visible: active on the Loaders in wifiRow.

(AI disclosure: debugged and written with AI assistance, tested locally on Arch Linux / niri with iwd + systemd-networkd.)

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

Verified locally on niri with iwd + systemd-networkd:

  • go test ./internal/server/network/... (including new wlan with pre-udev ether type case in TestLinkInfo_Classify) and make test-qml pass.
  • Disconnecting Wi-Fi in Control Center immediately updates the row to disconnected, and reconnecting no longer shifts the row content to the right.

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • I have opened a corresponding pull request in dux-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

@github-actions github-actions Bot added core Go daemon and CLI under core/ fix ui Quickshell UI under quickshell/ labels Nov 2, 2026
@bbedward

bbedward commented Nov 2, 2026

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
Checked: networkd link classification (isWired/isWireless with looksWirelessName, new test fails on base), iwd SSID/signal clearing in the signal handler and updateState (ConnectedNetwork still refills while connecting/roaming), wifiConnected gating in DMSNetworkService against the NM/wpa backends (they only report SSID when connected), and the visible: active Loaders in NetworkDetail. Model: claude-opus-5-5.

@bbedward
bbedward merged commit 63d7b8f into duxlabs-dev:master Nov 2, 2026
5 checks passed
purian23 pushed a commit that referenced this pull request Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Go daemon and CLI under core/ fix ui Quickshell UI under quickshell/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants