Skip to content

feat: show each network's kind in the network interface settings - #551

Merged
linroid merged 1 commit into
mainfrom
feat/network-interface-kinds
Oct 14, 2026
Merged

linroid merged 1 commit into
mainfrom
feat/network-interface-kinds

Conversation

@linroid

@linroid linroid commented Oct 14, 2026

Copy link
Copy Markdown
Owner

What

Settings → Network showed the same icon for every interface, so on a phone Wi-Fi and mobile data (and on desktop Wi-Fi, Ethernet and VPNs) looked alike. Each chip now shows a glyph for its kind of network.

  • API (library:api): NetworkInterfaceInfo.kind (NetworkKind: WIFI, CELLULAR, ETHERNET, VPN, BLUETOOTH, OTHER), sent as lowercase text. It defaults to OTHER, and unknown values decode as OTHER, so older and newer servers and apps work together. ABI dump updated.
  • Android (library:ktor): networkKind() now returns the enum it already read from the transport. Names stay "Wi-Fi", "Mobile data" and so on, built from the kind.
  • JVM (library:ktor): the kind is guessed.
    • On macOS it uses the system's hardware ports (networksetup -listallhardwareports, 2 s timeout), because en0 is Wi-Fi on some Macs and Ethernet on others.
    • Elsewhere it uses interface names (wlp2s0, enp3s0, wwan0, wg0, utun3) and Windows adapter descriptions.
    • Virtual adapters (Docker, bridges, Hyper-V) count as OTHER, and iPhone USB tethering counts as CELLULAR.
  • App: new KetchIcons Cellular (solid signal bars), Ethernet (RJ45 port), Vpn (lock), Bluetooth and Globe (other). Wi-Fi keeps Network.
  • KetchChip: new checkWhenSelected option. Selected chips used to replace their icon with a check, which hid the kind; the network chips turn it off and show selection through the accent fill.

Snapshots

The sample device has Wi-Fi, Ethernet and a VPN, so the mobile-data glyph isn't in these.

Before After
before after
before after

Notes for reviewers

  • Android network names are still English, as before. Translating them in the app would need the API to carry the interface name too, to keep "Wi-Fi (wlan1)" when two networks share a kind.
  • Tests: NetworkInterfacesTest (how the kind is sent and read back), InterfaceKindTest (macOS, Linux and Windows guesses), updated AndroidNetworkNamesTest. KetchIconTest, SettingsPageTest, DesignTokenUsageTest and HardcodedTextTest pass.

Wi-Fi, mobile data, Ethernet and VPN chips all used the same icon, as the
app did not know what kind of network an interface is. NetworkInterfaceInfo
now carries a NetworkKind (unknown values decode as OTHER, so older and
newer peers interoperate).

Android passes the kind it already read from the transport. The JVM engine
guesses it from macOS hardware ports (networksetup), interface names and
Windows adapter descriptions, counting virtual adapters as OTHER.

The chips show a glyph per kind (new Cellular, Ethernet, Vpn, Bluetooth and
Globe icons) and keep it while selected (KetchChip's checkWhenSelected).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T03:15:22.129514Z fb49da0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@linroid
linroid merged commit 113434f into main Oct 14, 2026
24 checks passed
@linroid
linroid deleted the feat/network-interface-kinds branch October 14, 2026 03:19
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