From b2f1dc65e9cf6f0b4e9c85b9d59d9b7f623b7a8b Mon Sep 17 00:00:00 2001 From: Nucleic Date: Tue, 14 Jul 2026 18:15:31 -0700 Subject: [PATCH] Merge nucleic/dusky-slate-newt-1i5r into dev --- NucleicRemote/NucleicRemote/Views/SettingsView.swift | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/NucleicRemote/NucleicRemote/Views/SettingsView.swift b/NucleicRemote/NucleicRemote/Views/SettingsView.swift index 26fd75c..a9c2547 100644 --- a/NucleicRemote/NucleicRemote/Views/SettingsView.swift +++ b/NucleicRemote/NucleicRemote/Views/SettingsView.swift @@ -59,7 +59,7 @@ struct SettingsView: View { } Section("Connection") { - LabeledContent("Status", value: store.connectivity.label) + LabeledContent("Status", value: Self.statusLabel(store.connectivity)) // What this pairing can dial โ€” the live transport is in Status above. if let host = IdentityStore.loadPairedHost() { LabeledContent("Transports", value: Self.transportsLabel(host)) @@ -209,6 +209,15 @@ struct SettingsView: View { } } + /// The live-connection status shown in the Connection section. Matches the generic + /// `Connectivity.label` except that a direct (hole-punched) path is named "Direct (STUN)" + /// here to surface *how* the peer-to-peer link was established โ€” `.direct` is produced only + /// by the STUN-based upgrade. The chip and other surfaces keep the shorter "Direct". + private static func statusLabel(_ connectivity: RemoteStore.Connectivity) -> String { + if case .connected(.direct) = connectivity { return "Connected ยท Direct (STUN)" } + return connectivity.label + } + /// Every path this pairing can dial: LAN always, plus what the host advertised โ€” a /// tailnet hint from the QR and/or a relay membership (QR or the host's later push). private static func transportsLabel(_ host: PairedHost) -> String {