Skip to content

feat(push): Live Activity remote refresh (ActivityKit over APNs)#132

Merged
oratis merged 1 commit into
mainfrom
feat/live-activity-refresh
Jun 19, 2026
Merged

feat(push): Live Activity remote refresh (ActivityKit over APNs)#132
oratis merged 1 commit into
mainfrom
feat/live-activity-refresh

Conversation

@oratis

@oratis oratis commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Keeps a pinned agent's Live Activity fresh while backgrounded via ActivityKit remote push — the last iOS-native differentiator, brought to the same "ready, needs an Apple key" bar as the APNs alert path. Based on main (everything else already merged).

What

  • iOSLiveActivityController starts the activity with pushType: .token, observes pushTokenUpdates, and forwards each token to POST /api/push/live-activity {sessionId, token}.
  • Backend — a per-session LA-token store; sendLiveActivityUpdate pushes over APNs with push-type liveactivity, topic <bundle>.push-type.liveactivity, and an aps {timestamp, event, content-state} payload mirroring the app's ContentState/detail(). PushBridge refreshes the activity on each agent update (3s-throttled) and sends event:"end" + clears the token on done/error. Reuses the APNs token-auth JWT/HTTP2 path.

Verification

npm run typecheck && npm run build && npm test823 pass / 1 skip (+5 LA tests: content-state mapping, payload shape, liveactivity headers/topic, store register/replace/unregister, and the PushBridge update→end+clear flow). ./build.sh → iOS BUILD SUCCEEDED.

Honest limit

Inert without an Apple push key (LISA_APNS_*) — live ActivityKit delivery can't be exercised here (no key, no device), so this is unit-/compile-verified, like the APNs alerts. ntfy remains the zero-Apple-infra path.

🤖 Generated with Claude Code

Keeps a pinned agent's Live Activity fresh while the app is backgrounded:
- iOS: LiveActivityController requests a push token (pushType: .token) and
  forwards each token to POST /api/push/live-activity {sessionId, token}.
- Backend: a per-session LA-token store; sendLiveActivityUpdate pushes over
  APNs with push-type "liveactivity" + topic "<bundle>.push-type.liveactivity"
  and an aps {timestamp, event, content-state} payload (mirroring the app's
  ContentState/detail). PushBridge refreshes the activity on each agent update
  (throttled) and sends event:"end" + clears the token on done/error.
Reuses the APNs token-auth JWT/HTTP2 path from the alert sender.

Like APNs alerts, this is inert without an Apple push key (LISA_APNS_*).

Verified: typecheck + build clean; npm test -> 823 pass / 1 skip (+5 LA tests:
content-state mapping, payload, liveactivity headers, store, PushBridge
update→end); ./build.sh -> iOS BUILD SUCCEEDED.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@oratis oratis merged commit 14850af into main Jun 19, 2026
1 check passed
@oratis oratis deleted the feat/live-activity-refresh branch June 19, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant