Investigate Live Activity Session Load

Nucleic-Session: 044A9B93-AB31-4B6B-9A27-3631261269B1
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-06 15:07:39 -07:00
co-authored by Nucleic
parent e8ac67093a
commit 39f2f9a279
@@ -550,24 +550,6 @@ final class RemoteStore: ObservableObject {
dashboard = DashboardSnapshot.merged([host1Dashboard, host2Dashboard])
LiveActivityManager.shared.sync(hostName: hostName, sessions: liveSessions)
NotificationRouter.shared.updateBadge(needsYouCount)
// TEMP DIAGNOSTIC: simulate a Live Activity cold-launch, where the detail opens while the
// channel is still offline and the connection lands a moment later (disconnected→live under
// an open detail). Gated on an env var so normal demo is untouched.
if ProcessInfo.processInfo.environment["NUCLEIC_DEMO_DELAY_CONNECT"] == "1" {
connectivity = .reconnecting
Task { @MainActor [weak self] in
try? await Task.sleep(for: .seconds(2))
guard let self else { return }
self.connectivity = .connected(.lan)
// The snapshot arriving for the open session (approval + a fresh event).
if let id = self.openSessionID {
self.openApprovals = [ApprovalRequest(
id: Self.demoApprovalID(for: id), sessionID: id, toolCallID: "t-appr",
toolName: "Bash", input: ["command": "npm run deploy"],
title: "Run npm run deploy", risk: .execute, createdAt: Date())]
}
}
}
}
/// Offline diff fixture (NUCLEIC_DEMO) so the full-patch Diff tab renders without a host.