diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index 8a276b7..d141863 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -44,6 +44,13 @@ final class RemoteStore: ObservableObject { /// from `hostName(forSession:)` instead. @Published private(set) var hostName: String = "" @Published private(set) var sessions: [WireSessionSummary] = [] + /// The last session list seen from a live host, persisted to disk (`SessionCache`) and reloaded + /// at launch. It backs `sessions` whenever nothing is connected, so the list shows a read-only + /// history while offline instead of an empty "waiting to connect" screen. + private var cachedSummaries: [WireSessionSummary] = SessionCache.loadSummaries() + /// Debounced disk-write tasks for the offline cache (coalesce a burst of updates into one write). + private var summaryPersistTask: Task? + private var transcriptPersistTask: Task? @Published private(set) var capabilities = WireCapabilities(canModifyToolInput: false, allowAlwaysScopes: []) @Published private(set) var grantedScope: DeviceScope = .approve /// The host's model/effort catalog (SYNC ยง5.2), driving the composer + session-header pickers.