Skip to content

fix(mobile): don't mark Android VPN/Tailscale as offline when connected#3949

Merged
juliusmarminge merged 3 commits into
pingdotgg:mainfrom
Wraient:main
Jul 22, 2026
Merged

fix(mobile): don't mark Android VPN/Tailscale as offline when connected#3949
juliusmarminge merged 3 commits into
pingdotgg:mainfrom
Wraient:main

Conversation

@Wraient

@Wraient Wraient commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What Changed

Stop treating Android expo-network isInternetReachable: false as offline when the interface is still connected.

  • In apps/mobile/src/connection/platform.ts, prefer isConnected for online/offline
  • Do not treat isInternetReachable === false as offline when the interface is connected

Why

On Android, isInternetReachable often stays false on Tailscale/VPN even when the active network works. Expo documents that this flag requires validated internet capability and, for VPN, non-zero downstream bandwidth.

That made the mobile connection supervisor report offline after a successful HTTP pair, so it never requested a websocket ticket or opened /ws. Server-side this showed as paired mobile sessions with last connected: never.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes (N/A)

Validation

  • Built and installed an Android preview APK with this change; paired over Tailscale and confirmed the environment connects online (WebSocket live, no longer stuck offline after pairing)
image

Note

Low Risk
Single-condition change in mobile network status mapping; may report online in edge cases where there is no real internet, but restores correct behavior for VPN/Tailscale.

Overview
Fixes mobile connectivity on Android VPN/Tailscale by changing how networkStatus in platform.ts maps expo-network state into the shared Connectivity layer.

Previously, isInternetReachable === false forced "offline" even when isConnected was true. On Android that flag is often wrong on VPN/Tailscale, so the connection supervisor stayed offline after pairing and never opened the WebSocket.

Now only isConnected === false yields offline; a connected interface with an unreliable isInternetReachable can report "online" or "unknown" instead.

Reviewed by Cursor Bugbot for commit bd40ea0. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix Android VPN/Tailscale connections being marked as offline in mobile app

The networkStatus function in platform.ts previously returned "offline" when isInternetReachable was false, which incorrectly flagged VPN and Tailscale connections on Android as offline. The fix narrows the offline condition to only check state.isConnected === false, so a connected device with an unresolvable isInternetReachable returns "online" or "unknown" instead.

Macroscope summarized bd40ea0.

On Android, isInternetReachable is often false on Tailscale/VPN even when the
interface works, so pairing succeeded over HTTP but the supervisor never opened
WebSocket. Prefer isConnected for offline detection.
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d595c384-5241-41c4-9f56-92a5bbc49785

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@macroscopeapp

macroscopeapp Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Small, straightforward bug fix that relaxes overly aggressive offline detection logic on Android VPN/Tailscale. Single-line change with clear intent and limited scope.

You can customize Macroscope's approvability policy. Learn more.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jul 22, 2026
@juliusmarminge
juliusmarminge enabled auto-merge (squash) July 22, 2026 21:56
@juliusmarminge
juliusmarminge merged commit bc9428a into pingdotgg:main Jul 22, 2026
14 checks passed
UNN-Devotek pushed a commit to unn-corp/t3code that referenced this pull request Jul 23, 2026
jetblk added a commit to jetblk/t3code that referenced this pull request Jul 23, 2026
…r refresh (#7)

* feat(web): copy branch name via right-click in the branch selector (pingdotgg#4275)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* Add remote server updates and standalone service management (pingdotgg#4286)

Co-authored-by: codex <codex@users.noreply.github.com>

* Refine light-mode sidebar surfaces (pingdotgg#4268)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: codex <codex@users.noreply.github.com>

* fix(mobile): don't mark Android VPN/Tailscale as offline when connected (pingdotgg#3949)

* improve and prevent silent thread branch drift and PR fetching (pingdotgg#2284)

Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>

---------

Co-authored-by: Theo Browne <me@t3.gg>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: Rushikesh Gaikwad <81632222+Wraient@users.noreply.github.com>
Co-authored-by: legs <145564979+justsomelegs@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants