Foreground Connection Delay Adjustment
Nucleic-Session: CB658C4F-A19F-447C-B313-7CB21783BD94 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -1621,6 +1621,13 @@ final class RemoteStore: ObservableObject {
|
||||
/// to the first live Mac. Demo has no connections and mutates the seeded aggregate directly.
|
||||
private func send(_ msg: ClientMsg) {
|
||||
if demoMode { demoHandle(msg); return }
|
||||
// Optimistic window (post launch/foreground): if no Mac is live yet but we're presenting a
|
||||
// pretend-connected UI, hold the user's intent and replay it the instant a link comes up
|
||||
// rather than dropping it silently. Discarded if the window lapses without a connection.
|
||||
if !hasLiveConnection, isOptimisticActive, isQueueableIntent(msg) {
|
||||
pendingActions.append((msg, Date()))
|
||||
return
|
||||
}
|
||||
switch msg {
|
||||
// Session-owning intents → the Mac that has this session.
|
||||
case .subscribe(let s):
|
||||
|
||||
Reference in New Issue
Block a user