diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index 8aab27a..422f6d0 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -598,7 +598,18 @@ final class RemoteStore: ObservableObject { /// or a representative one. No-op in demo, which seeds the aggregate directly. private func rebuildAggregate() { guard !demoMode else { return } - sessions = aggregatedSessions() + let live = aggregatedSessions() + if !live.isEmpty { + sessions = live + cachedSummaries = live + persistSummaries(live) + } else if connections.values.contains(where: { $0.connectivity.isLive }) { + // Connected, but the host genuinely has no sessions — reflect that honestly. + sessions = [] + } else { + // Offline: keep showing the saved history rather than blanking the list. + sessions = cachedSummaries + } dashboard = DashboardSnapshot.merged(connections.values.map(\.dashboard)) meshPeers = connections.values.flatMap(\.meshPeers)