Session Sync Repair

Nucleic-Session: 0C7BC346-0002-4533-ADDD-3B4C92E58527
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-05 04:30:42 -07:00
co-authored by Nucleic
parent c5b7846d7c
commit bbba9a666b
@@ -477,7 +477,10 @@ final class RemoteStore: ObservableObject {
} }
cb.openSnapshot = { [weak self] snap in cb.openSnapshot = { [weak self] snap in
guard let self, hostID == self.openSessionHostID, snap.summary.sessionID == self.openSessionID else { return } 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 self.openApprovals = snap.pendingApprovals
} }
cb.openEvents = { [weak self] batch in cb.openEvents = { [weak self] batch in