Skip to content

[High] iOS: firing notifications and Live Activity stop working once the app is backgrounded #147

Description

@BenSeverson

Summary
All status detection — the "Firing Complete" / "Kiln Error" notifications and Live Activity updates — is driven by the WebSocket in KilnStore.handleWebSocketUpdate. iOS suspends the app (and the socket) within seconds of backgrounding, and the app declares no background modes, no scenePhase handling, and starts the Live Activity with pushType: nil and staleDate: nil.

Firings run 8–12 hours with the phone in a pocket. In practice:

  • The completion/error notifications are gated on the app being non-active (NotificationManager.swift:26) yet require the WS to be alive — a nearly empty intersection. The safety-relevant "Kiln Error / check kiln immediately" alert will essentially never fire.
  • The lock-screen Live Activity freezes at its last value and presents stale temperature as current, indefinitely (staleDate: nil at FiringActivityManager.swift:29-31, 57).

Location

  • ios/Bisque/Bisque/State/KilnStore.swift:104-123 (WS-driven transitions)
  • ios/Bisque/Bisque/LiveActivity/FiringActivityManager.swift:29-31
  • ios/Bisque/Bisque/Notifications/NotificationManager.swift:26
  • No scenePhase handling anywhere in the app target.

Fix direction (increasing effort)

  1. Set a staleDate (~60–90s) on Live Activity content so stale data renders as stale.
  2. Refresh status and restart the WS on scenePhase == .active.
  3. For real background delivery: the firmware already has a webhookUrl setting — documenting/wiring a push bridge like ntfy for completion/error events closes the safety gap without running push infrastructure. Live Activity push updates (ActivityKit push tokens) would need an APNs relay, a much bigger lift for a LAN-only device.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3iOS app defectsbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions