Skip to content

v2.3.0 — Cross-Device Live Timer Sync

Choose a tag to compare

@TurkeyNostr TurkeyNostr released this 23 Aug 18:03
· 21 commits to main since this release

Live Timer Sync

Start a nap timer on one phone, stop it on the other. Both parents see the running timer in real time.

How it works

  • When you start a Sleep or Breast timer, an encrypted ActiveSession event is published to your partner via Nostr (kind 30078, NIP-44 encrypted)
  • Your partner phone receives it and shows the timer as running with a Started by partner badge
  • Either parent can stop the timer — the stopper creates the record and publishes a session-ended event
  • The other parent phone clears the timer automatically

Edge cases handled

  • Partner offline at start: timer appears with correct elapsed time on reconnect
  • App killed on starter phone: timer still displays on partner phone until stopped
  • Simultaneous stop: first event wins, deduped by sessionId

Technical

  • New ActiveSession data model (sessionId, label, childId, startTime, startedBy, alarmMinutes)
  • BackupService: publishSession/decryptSession/endSession
  • NostrManager: StateFlows for remote sessions, relay subscriptions, echo dedup
  • LiveTimer: accepts remoteSession, shows partner badge, either-side stop
  • No new dependencies, no new permissions, all on existing NIP-44 encryption infrastructure

Version: 2.3.0 (code 51)