fix(mobile): default bare IP pairing to HTTP
Problem
The mobile Add Environment form treated every schemeless host as HTTPS. Entering the LAN IP and port advertised by a desktop server therefore tried https://<lan-ip> even though direct LAN endpoints use HTTP, causing manual pairing to fail while the QR-code flow worked.
Closes #4893.
What Changed
- default schemeless IP literals to HTTP in the mobile pairing URL builder
- keep schemeless hostnames on HTTPS and preserve every explicit scheme
- add focused regression coverage for all three cases
- document the mobile LAN behavior in the user guide and mobile test runbook
User Impact
Users can paste a LAN IP and port into the mobile form without adding http:// manually. Secure endpoints remain opt-in through an explicit https:// scheme.
UI Changes
No visual changes. This only changes the URL used when the user submits a bare numeric IP address.
Validation
pnpm exec vp test run apps/mobile/src/features/connection/pairing.test.ts— 7 passedpnpm exec vp run --filter @t3tools/mobile typecheck- targeted lint and formatting checks for the four changed files
git diff --check upstream/main...HEAD
An integrated simulator pass was not available on this host because neither Xcode/Simulator nor the Android SDK/emulator is installed.
Model: GPT-5.6 Sol | Harness: Codex desktop app
[!NOTE]
Default bare IP addresses to HTTP in mobile
buildPairingUrl
buildPairingUrlin pairing.ts now uses HTTP for schemeless IP addresses (IPv4 and IPv6) and HTTPS for schemeless hostnames; explicit schemes are always preserved.- A new
isIpLiteralhelper parses the host to distinguish IP literals from hostnames.- Docs and skill guidance updated to clarify that bare IPs use HTTP and bare hostnames use HTTPS in the mobile Add Environment form.
- Behavioral Change: previously all schemeless hosts defaulted to HTTPS; bare IPs now default to HTTP.
Macroscope summarized afc00fb.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
2ac5b61a-65c7-471f-9fb1-0afa5299b51fYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- [ ] 🔍 Trigger review
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.
Comment @coderabbitai help to get the list of available commands.
Approvability
Verdict: Approved afc00fb
Straightforward bug fix that defaults bare IP addresses to HTTP (since local IPs typically lack valid TLS certificates) while preserving HTTPS for hostnames. Change is self-contained, well-tested, and documented.
You can customize Macroscope's approvability policy. Learn more.