Conversation
Automated AI review
Verified: the change fixes the setup reported in #12069. With a Mihomo TUN on a policy-routing table and an Ethernet default in the main table, the status and
Output is unchanged for a single Ethernet or Wi-Fi default, and for Ethernet plus Wi-Fi in either metric order. Hosts without NetworkManager, WWAN and IPv6-only hosts fall back to the old probe route as before. No scenario produced a nonzero exit or stderr output. The script and its call sites are unchanged between the merge base and the current Three points are worth addressing: the Ethernet/Wi-Fi allow-list can pick the wrong link, the new address fallback can report the wrong address, and several open PRs rewrite the same code and add the same test file. A lower-priority Wi-Fi link wins over a bridge, bond or VLAN default
Stubbed scenario: wired NIC in
Impact: on such hosts the panel shows the Wi-Fi SSID, address, gateway and byte counters while traffic flows over the bridge. The merge base showed the correct device. The same allow-list also leaves a bond host behind a TUN unfixed (stubbed: it still shows Suggested change: take the first main-table default whose device is not a tunnel (skip types such as The address fallback can report an address the kernel does not useWhen the selected route has no
Impact: on such interfaces the panel and Suggested change: choose the global address whose subnet contains the gateway, and read Overlap with open PRs on the same script and test file
Impact: whichever of these PRs merges later needs rework in the script and, for the add/add cases, a renamed or merged test file. Suggested change: name a distinct test file (for example NotesBehaviour change beyond TUN proxies: full-tunnel VPNs that leave a physical default in the main table now show the physical link instead of the VPN interface. In stubbed scenarios this covers wg-quick (default in table 51820), OpenVPN Optional test improvement: the test does not cover the promised fallback to the probe route. A mutant that replaces the Review informationTest scope: source review of the pinned head against the merge base and current AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
|
Thanks for the detailed review. I pushed 1fda37d to address the route and address-selection cases: the main-table selection now skips tunnel and dead defaults without excluding bridges/bonds, and when a route has no preferred source the script asks the kernel for the gateway source on the selected interface. The prefix is looked up for the displayed address. I also renamed the test to network-status-route-test.sh and added cases for bridge + backup Wi-Fi, bond + TUN, dead default, multiple addresses, and the probe fallback. The PR description now links #8866 and calls out the wider VPN behavior. Focused test, CLI test, bash syntax and shellcheck passed; the full shell run timed out after 240 seconds, so I am not claiming a full-suite pass. I have not tested these configurations on live bridge/bond/VPN hosts; the added cases use command stubs. Please let me know if you prefer the selection policy in #8866. |
|
Reviewed at 1fda37d. Nothing was run yet: classification comes before testing, and it did not settle. Classification is unsettled. Two models classed this pull request separately. Claude Opus 5.5 classed it as a bug fix: on Related: #8866 fixes the same misreport in the same function with a different rule (first connected NetworkManager Wi-Fi or Ethernet device, then the lowest-metric main-table default). #12114 also touches this script but only switches to Wi-Fi when the probe lands on a tunnel, keeping the tunnel's address and gateway in Waiting on: the maintainer, to decide whether the panel should describe the physical link or the route traffic takes, and which of this and #8866 to pursue. Nothing is needed from you for now. |
What
prefsrc. Report the prefix for that same address.Why
With Mihomo/Clash TUN mode,
ip route get 1.1.1.1resolves to theMetaTUN through a policy-routing table. The network panel then reportsMetaas Ethernet and displays its internal198.18.0.1address instead of the physical interface and LAN address. This also changes the display for full-tunnel VPNs that leave a non-tunnel default route in the main table: the panel reports that underlying link rather than the VPN. If no usable main-table default exists, it retains the probe-route behavior.Fixes #12069. Related: #8866 addresses the same panel issue with a different route selection policy; maintainers may prefer one approach over the other.
Verification
bash test/shell.d/network-status-route-test.sh(8 assertions passed)./test/clipassedbash -n bin/omarchy-network-status test/shell.d/network-status-route-test.shpassedshellcheck -e SC2086,SC1091 bin/omarchy-network-status test/shell.d/network-status-route-test.shpassed./bin/omarchy-network-status --verbosereports physicalenp0s13f0u1,192.168.50.248/24and gateway192.168.50.1../test/shelldid not complete within 240 seconds on this machine. The new network-status test passed during the run; the run also reported failures in unrelated bar/config/migration/plugin tests before the timeout. No full-suite pass is claimed.