iOS Live Activity Updates

Nucleic-Session: 665980BA-E8A5-4E84-9DF4-1757CF792353
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-06 12:55:21 -07:00
co-authored by Nucleic
parent 0c6841a8fb
commit 52df910d6c
@@ -122,10 +122,12 @@ final class LiveActivityManager {
} }
} }
/// Apply `state` to the Activity — deduped against the last push and coalesced through one /// Apply `state` to the Activity — coalesced through one serial task so the newest state always
/// serial task so the newest state always wins. /// wins, and gated on the attention signature so a mid-turn churn tick (which changes the diff
/// totals on every transcript edit but no status) doesn't spend ActivityKit's update budget. The
/// fresh churn still rides along on the next status-driven push.
private func push(_ state: NucleicSessionAttributes.ContentState, hostName: String) { private func push(_ state: NucleicSessionAttributes.ContentState, hostName: String) {
guard state != lastState else { return } guard state.attentionSignature != lastState?.attentionSignature else { return }
lastState = state lastState = state
guard let activity else { guard let activity else {