wifi: omit empty info snapshot and tidy up

- Info.WiFi uses json "wf" with omitempty so systems without Wi-Fi no
  longer store/broadcast "wifi":null
- move osascript exec into wifi_darwin.go; drop unused commandRunner
- share strongest-connection logic between table cell and sorting
- trim agent/wifi README
This commit is contained in:
henrygd
2026-09-25 18:42:33 -04:00
parent 16e3fbadce
commit 24792aa24f
9 changed files with 37 additions and 72 deletions

View File

@@ -33,8 +33,8 @@ func TestWiFiWireSnapshot(t *testing.T) {
if err = json.Unmarshal(encoded, &info); err != nil {
t.Fatal(err)
}
if _, ok := info["wifi"]; !ok {
t.Fatal("current absence must be explicit")
if _, ok := info["wf"]; ok != (len(wifi) > 0) {
t.Fatalf("wf present = %v for snapshot %v", ok, wifi)
}
}
}