Foreground Connection Delay Adjustment

Nucleic-Session: CB658C4F-A19F-447C-B313-7CB21783BD94
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-09 14:37:00 -07:00
co-authored by Nucleic
parent a7e83a7e87
commit d31e556ca8
@@ -482,6 +482,11 @@ final class RemoteStore: ObservableObject {
func onForeground() {
endBackgroundHold()
guard !demoMode, isPaired else { return }
// Pretend we're still connected for a few seconds while the (possibly OS-killed) sockets
// re-handshake — the reconnect below is fast, and flashing "Disconnected" in the meantime
// just feels janky. Set before `reconnect()` so the connecting/reconnecting states it
// produces are overlaid with the last-live projection (see `rebuildAggregate`).
beginOptimisticWindow()
// Foreground again: the app self-creates its own Live Activity now, so tell the hosts to stop
// push-to-starting it (UX_IOS §5.3). Sent to already-live hosts; ones still reconnecting get
// it via `didUpdate` once live.