From d3cc7796dd974f0c19b3ba87d817963809b365bb Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Thu, 2 Jul 2026 21:41:33 -0700 Subject: [PATCH] Add Remote Release Channel Check Nucleic-Session: 7D1A5F60-CF2F-44E6-B060-51C4C2EA79D1 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Models/RemoteStore.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index 91d286f..ead295a 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -783,6 +783,15 @@ final class RemoteStore: ObservableObject { openDiff = diff diffLoading = false case .wireError(let error): + // A channel mismatch is a permanent, connection-fatal condition (the host and this + // remote were built from incompatible release channels). Surface it as a persistent + // failure with a clear message rather than a transient bubble that the follow-on + // `.closed` would paper over with "reconnecting". + if error.code == .channelMismatch { + teardown() + connectivity = .failed(error.message) + break + } // Not fatal — surface as a transient bubble (the Mac's last-error overlay). // Losing an approval race isn't an error worth interrupting for; the card // collapses on the matching `approvalResolved`.