diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index 68398c0..095c6eb 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -49,6 +49,11 @@ final class RemoteStore: ObservableObject { /// Home / Projects / To-Dos state — the dashboard projection. @Published private(set) var dashboard = DashboardSnapshot.empty + /// The host's mesh peers (mesh P4), from `HostMsg.peerList`. Populated only when the host + /// advertises `capabilities.canListPeers` and the client asks; drives the future mesh device + /// list and session-transfer destination picker. + @Published private(set) var meshPeers: [PeerSummary] = [] + // Open session projection. @Published private(set) var openSessionID: SessionID? @Published private(set) var openEvents: [AgentEvent] = [] @@ -1034,6 +1039,10 @@ final class RemoteStore: ObservableObject { guard diff.sessionID == openSessionID else { break } openDiff = diff diffLoading = false + case .peerList(let peers): + // 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 .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