From 39fd8081f7d4cd8dc780a70d68cb70ce12b31f2f Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Thu, 9 Jul 2026 14:37:30 -0700 Subject: [PATCH] Foreground Connection Delay Adjustment Nucleic-Session: CB658C4F-A19F-447C-B313-7CB21783BD94 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 985535f..7d9e829 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -1493,7 +1493,10 @@ final class RemoteStore: ObservableObject { if demoMode { demoHandle(.approvalRespond(approval.id, decision)) } else { - connection(owningSession: approval.sessionID)?.send(.approvalRespond(approval.id, decision)) + // Through `send` so an Allow/Deny tapped during the optimistic window is queued and + // replayed on connect (a live host resolves it; others no-op on the unknown id), rather + // than dropped because the owning Mac's socket is mid-reconnect. + send(.approvalRespond(approval.id, decision)) } openApprovals.removeAll { $0.id == approval.id } // optimistic dismiss; host confirms }