From aa5eaaee9ccac90d10260cd97b02d290532258bc Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 22:31:45 -0700 Subject: [PATCH] Session Cache Implementation Nucleic-Session: B2346642-3353-4BD5-9DE2-A8B77BD66C98 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Models/RemoteStore.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index 0b2fe2b..3578223 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -837,6 +837,9 @@ final class RemoteStore: ObservableObject { diffLoading = false markOpened(sessionID) if demoMode { seedDemoTranscript(sessionID); return } + // Seed from the on-device cache so the transcript shows instantly — including fully offline, + // where the subscribe below is a no-op. Live events merge on top by seq (dedup). + loadCachedTranscript(sessionID) // Tell the owning connection so it forwards the snapshot/events (and dedupes them), re-derive // the context host (capabilities/scope/catalog/connectivity now follow it), then subscribe. connection(owningSession: sessionID)?.openSessionID = sessionID