From ac379a0523c8b6daab4fa6cdb6888bc51c0711d8 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sat, 4 Jul 2026 17:09:20 -0700 Subject: [PATCH] Fix iOS build: handle mesh transfer verbs/events in RemoteStore switches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The P4/P5 mesh work added ClientMsg cases (addressUpdate, transferOffer/Chunk/Commit/Cancel) and SyncClient.Event cases (transferAccept/Reject/Ready/Committed/ChunkAck) but never updated the iOS RemoteStore's two exhaustive switches — the demo-simulator ClientMsg handler and the event handler — so NucleicRemote failed to compile ("switch must be exhaustive"). The app target isn't built by `swift build`, so this landed unnoticed on the branch. Both are inert on the phone: it's never a transfer source/destination and demo has no peer Macs, so the new cases join the passive `break`. Verified with an iOS Simulator build (BUILD SUCCEEDED), which also confirms this session's moved/arrived-provenance rendering edits compile. Co-Authored-By: Claude Opus 4.8 --- NucleicRemote/NucleicRemote/Models/RemoteStore.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index 0352e85..0c1412b 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -816,7 +816,10 @@ final class RemoteStore: ObservableObject { case .setSessionShipBranch(let id, let branch): demoUpdateSession(id) { $0.demoCopy(shipBranch: .some(branch)) } case .hello, .listSessions, .listDashboard, .subscribe, .unsubscribe, - .ping, .cancelQueuedMessage, .fetchDiff, .listPeers: + .ping, .cancelQueuedMessage, .fetchDiff, .listPeers, .addressUpdate, + // Session transfer (mesh P5) is a Mac↔Mac flow — the phone never originates these, + // and demo has no peer Macs, so they're inert here. + .transferOffer, .transferChunk, .transferCommit, .transferCancel: break // passive / already handled by the seeded fixtures (demo has no mesh peers) } } @@ -1072,6 +1075,10 @@ final class RemoteStore: ObservableObject { // Mesh P4: the host's known peers, for the (future) mesh device list and transfer // picker. Recorded now so multi-host UI can render it; single-host builds ignore it. meshPeers = peers + case .transferAccept, .transferReject, .transferReady, .transferCommitted, .transferChunkAck: + // Session-transfer replies (mesh P5) only reach a *source* Mac driving a transfer; a + // phone is never a transfer source, so these are inert here. + break case .wireError(let error): // A channel mismatch means the host and this remote were built from incompatible // release channels. Surface it as a persistent failure with a clear message rather