Add Remote Release Channel Check

Nucleic-Session: 7D1A5F60-CF2F-44E6-B060-51C4C2EA79D1
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-02 21:41:33 -07:00
co-authored by Nucleic
parent a06c2c58ad
commit d3cc7796dd
@@ -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`.