Fix iOS build: handle mesh transfer verbs/events in RemoteStore switches
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 <[email protected]>
This commit is contained in:
@@ -816,7 +816,10 @@ final class RemoteStore: ObservableObject {
|
|||||||
case .setSessionShipBranch(let id, let branch):
|
case .setSessionShipBranch(let id, let branch):
|
||||||
demoUpdateSession(id) { $0.demoCopy(shipBranch: .some(branch)) }
|
demoUpdateSession(id) { $0.demoCopy(shipBranch: .some(branch)) }
|
||||||
case .hello, .listSessions, .listDashboard, .subscribe, .unsubscribe,
|
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)
|
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
|
// 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.
|
// picker. Recorded now so multi-host UI can render it; single-host builds ignore it.
|
||||||
meshPeers = peers
|
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):
|
case .wireError(let error):
|
||||||
// A channel mismatch means the host and this remote were built from incompatible
|
// 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
|
// release channels. Surface it as a persistent failure with a clear message rather
|
||||||
|
|||||||
Reference in New Issue
Block a user