Skip to content

fix(ui): recognize VPN and all networks for network scan availability#5882

Merged
jamesarich merged 1 commit into
meshtastic:mainfrom
jeremiah-k:bugfix/vpn-network-scan-transport
Jun 20, 2026
Merged

fix(ui): recognize VPN and all networks for network scan availability#5882
jamesarich merged 1 commit into
meshtastic:mainfrom
jeremiah-k:bugfix/vpn-network-scan-transport

Conversation

@jeremiah-k

Copy link
Copy Markdown
Contributor

Overview

This PR fixes the network-scan availability banner so it reflects any usable network-scan transport, not just Android's default active network.

Previously, the banner could remain visible when WiFi was connected but Android kept cellular as the default route. It also did not recognize VPN overlays such as ZeroTier or Tailscale as valid reachability paths for TCP nodes.

Key Changes

  • Checks all current system networks instead of only activeNetwork.
  • Treats WiFi, Ethernet, or VPN as valid network-scan transports.
  • Keeps cellular-only treated as unavailable for network scan.
  • Removes the unused hasCellular field from NetworkTransportInfo.
  • Shows the network-scan warning while the Network section is visible or network scan is actively running.
  • Adds common tests for WiFi, Ethernet, VPN, cellular-only, VPN loss, and scan-active banner behavior.

Notes

This is independent from WiFi/TCP handshake recovery and was split out from #5856 to keep that PR focused on the core connection recovery changes. I plan to land this first, then rebase #5856 so the extracted hunks drop out cleanly.

@github-actions github-actions Bot added the bugfix PR tag label Jun 20, 2026
Check all system networks instead of only Android's default network for
WiFi availability. Treat WiFi, Ethernet, and VPN as valid network-scan
transports; keep cellular-only as unavailable. Show the network-scan
warning while the Network section is visible or scan is actively running.
@jamesarich jamesarich force-pushed the bugfix/vpn-network-scan-transport branch from d114c73 to 0aa00e2 Compare June 20, 2026 17:10
@github-actions

Copy link
Copy Markdown
Contributor

🖼️ Preview staleness check — advisory

This PR modifies UI composables but does not update any *Previews.kt files.

Previews power screenshot tests and in-app docs screenshots. Keeping them current ensures visual regression coverage stays accurate.

Changed UI files:

feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/ConnectionsScreen.kt

What to check:

Pattern Preview file convention
feature/{name}/…/ui/ or component/ feature/{name}/…/*Previews.kt
core/ui/…/ core/ui/…/ (previews colocated)

Adding previews checklist:

  1. Create or update a *Previews.kt file in the same module with @PreviewLightDark
  2. Add @Suppress("PreviewPublic") if the preview is consumed by screenshot-tests
  3. Add corresponding @PreviewTest function in screenshot-tests/src/screenshotTest/
  4. Run ./gradlew :screenshot-tests:updateDebugScreenshotTest to generate reference images

If this PR does not require preview updates (e.g., logic-only change, non-visual refactor), add the skip-preview-check label to dismiss.

@github-actions

Copy link
Copy Markdown
Contributor

📄 Docs staleness check — advisory

This PR modifies user-facing UI source files but does not update any page under docs/en/user/ or docs/en/developer/.

⚠️ Doc changes propagate to 3 consumers: in-app docs browser, Jekyll site (GitHub Pages), and meshtastic.org (Docusaurus sync). Updating a page in docs/en/ automatically flows to all three.

Changed source files:

core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/util/NetworkTransportInfo.kt
core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/util/PlatformUtils.kt
feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/ui/ConnectionsScreen.kt

What to check:

Changed area Likely doc page
feature/messaging/ docs/en/user/messages-and-channels.md
feature/node/ docs/en/user/nodes.md or docs/en/user/node-metrics.md
feature/map/ docs/en/user/map-and-waypoints.md
feature/connections/ docs/en/user/connections.md
feature/settings/ docs/en/user/settings-radio-user.md or docs/en/user/settings-module-admin.md
feature/firmware/ docs/en/user/firmware.md
feature/intro/ docs/en/user/onboarding.md
feature/discovery/ docs/en/user/discovery.md
feature/docs/ Internal docs infrastructure
core/ui/ docs/en/developer/codebase.md or component-specific user pages

New page checklist (if adding a new doc page):

  1. Create the .md file in docs/en/user/ or docs/en/developer/ with last_updated frontmatter
  2. Register in DocBundleLoader.kt with string resources (in-app browser)
  3. Jekyll and Docusaurus sync pick up new pages automatically — no config change needed

If this PR does not require a doc update (e.g., internal refactor, bug fix, test change), add the skip-docs-check label to dismiss this check.

Cross-platform note: This check is advisory while doc coverage matures. Both Android and Apple repos use the same skip-docs-check label and advisory severity. See meshtastic/design standards for shared conventions.

@jamesarich jamesarich enabled auto-merge June 20, 2026 17:19
@jamesarich jamesarich added this pull request to the merge queue Jun 20, 2026
Merged via the queue into meshtastic:main with commit 75f229e Jun 20, 2026
22 checks passed
@jeremiah-k jeremiah-k deleted the bugfix/vpn-network-scan-transport branch June 20, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants