From bbba9a666b7d31fb27cdb095cf94ed8c823e77f6 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 04:30:42 -0700 Subject: [PATCH] Session Sync Repair Nucleic-Session: 0C7BC346-0002-4533-ADDD-3B4C92E58527 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Models/RemoteStore.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index cfe8834..97e1d0e 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -477,7 +477,10 @@ final class RemoteStore: ObservableObject { } cb.openSnapshot = { [weak self] snap in guard let self, hostID == self.openSessionHostID, snap.summary.sessionID == self.openSessionID else { return } - self.openEvents = snap.recentEvents + // Merge, don't replace: a fresh open merges into an empty transcript (the tail window), + // while a reconnect's warm-resubscribe delta appends to the history already on screen + // instead of truncating it to the host's 200-event tail. + self.openEvents = Self.mergedEvents(self.openEvents, snap.recentEvents) self.openApprovals = snap.pendingApprovals } cb.openEvents = { [weak self] batch in