From 0b9afb22f38ffcc8374d5f114f1cb4ae4fd62293 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sat, 4 Jul 2026 18:37:15 -0700 Subject: [PATCH] =?UTF-8?q?nvrsion:=20Add:=20Adjust=20Tailscale=20Node=20N?= =?UTF-8?q?ame=20format=20and=20remove=20=E2=80=9CTailscale=20auth=20key?= =?UTF-8?q?=E2=80=9D=20setting=20to=20enable=20immediate=20browser=20login?= =?UTF-8?q?=20when=20toggle=20is=20enabled.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nucleic-Promote: 1 Co-authored-by: Nucleic --- .../NucleicRemote/Models/RemoteStore.swift | 3 +-- .../NucleicRemote/Views/SettingsView.swift | 17 ++++------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index 64b4baf..9eaa6ce 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -641,8 +641,7 @@ final class RemoteStore: ObservableObject { .appendingPathComponent("tailnet", isDirectory: true) return TailnetConfig( hostName: TailnetConfig.nodeName(for: UIDevice.current.name), - stateDirectory: base, - authKey: TailnetAuthStore.loadAuthKey()) + stateDirectory: base) } func unpair() { diff --git a/NucleicRemote/NucleicRemote/Views/SettingsView.swift b/NucleicRemote/NucleicRemote/Views/SettingsView.swift index 6c4224d..baf9980 100644 --- a/NucleicRemote/NucleicRemote/Views/SettingsView.swift +++ b/NucleicRemote/NucleicRemote/Views/SettingsView.swift @@ -9,8 +9,6 @@ struct SettingsView: View { @State private var showManualPair = false /// Bumped after removing a paired Mac so the "Paired Macs" list re-reads the registry (mesh P3). @State private var pairedHostsToken = UUID() - @State private var tailscaleAuthKey: String = TailnetAuthStore.loadAuthKey() ?? "" - @FocusState private var tailscaleKeyFocused: Bool @AppStorage("nucleic.showRawEvents") private var showRaw = false @AppStorage("nucleic.showLockEvents") private var showLockEvents = true @AppStorage(HeartbeatSettings.shareAnonymousUsageKey) private var shareAnonymousUsage = true @@ -106,16 +104,6 @@ struct SettingsView: View { Section { if TailnetSupport.isBuiltIn { - // Commit on editing end, not per keystroke — a per-change save would - // clear the valid Keychain key on the first backspace of an edit. - SecureField("Auth key (tskey-auth-…)", text: $tailscaleAuthKey) - .autocorrectionDisabled() - .textInputAutocapitalization(.never) - .focused($tailscaleKeyFocused) - .onSubmit { TailnetAuthStore.saveAuthKey(tailscaleAuthKey) } - .onChange(of: tailscaleKeyFocused) { - if !tailscaleKeyFocused { TailnetAuthStore.saveAuthKey(tailscaleAuthKey) } - } if let status = store.tailnetStatus { LabeledContent("Node", value: status) } @@ -123,6 +111,9 @@ struct SettingsView: View { Link(destination: loginURL) { Label("Open Tailscale login", systemImage: "arrow.up.forward.app") } + } else { + Text("No setup needed — when your Mac shares over Tailscale, this iPhone joins your tailnet on first connect and opens a browser login to approve itself.") + .font(.caption).foregroundStyle(.secondary) } } else { Text("This build doesn't include Tailscale support.") @@ -131,7 +122,7 @@ struct SettingsView: View { } header: { Text("Tailscale") } footer: { - Text("Needed only when your Mac shares over Tailscale (Mac ▸ Settings ▸ Remote ▸ Connect via). Leave the key empty to approve this iPhone in your browser on first connect, or create an auth key in the Tailscale admin console (kept in the Keychain, used once to join your tailnet).") + Text("Needed only when your Mac shares over Tailscale (Mac ▸ Settings ▸ Remote ▸ Connection methods). This iPhone joins your tailnet in the browser on first connect.") } Section("This device") {