ios: surface the browser-login step on the pairing intro screen

A first tailnet pairing with no auth key detours through a Tailscale browser
login that can take minutes. The intro screen — the only UI an unpaired phone
has — showed just "Connecting to your Mac…" for that whole window, and if
the user closed Safari there was no way back to the login page (the Settings
tab with the login link only exists once paired). The intro's pairing status
now explains the approval step and links to the login page whenever the
embedded node is waiting on one.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-07-03 16:25:27 -07:00
co-authored by Claude Fable 5
parent e623247117
commit 57d0ccc5f6
@@ -199,8 +199,22 @@ struct PairingIntroView: View {
private var pairingStatus: some View {
switch store.connectivity {
case .connecting, .reconnecting:
// A first tailnet pairing with no auth key detours through a browser login
// that can take minutes — and this intro is the ONLY screen an unpaired phone
// has (no Settings tab yet), so the way back to the login page must live here.
if let loginURL = store.tailnetLoginURL {
VStack(spacing: 6) {
Label("Approve this iPhone in your browser to join your tailnet.",
systemImage: "person.crop.circle.badge.checkmark")
.font(.footnote).foregroundStyle(.secondary)
.multilineTextAlignment(.center).padding(.horizontal, 32)
Link("Open the Tailscale login page", destination: loginURL)
.font(.footnote.weight(.medium))
}
} else {
Label("Connecting to your Mac…", systemImage: "arrow.triangle.2.circlepath")
.font(.footnote).foregroundStyle(.secondary)
}
case .hostOffline:
Label("Can't reach your Mac. Make sure it's on the same Wi‑Fi and remote access is on.",
systemImage: "wifi.exclamationmark")