buzz icon indicating copy to clipboard operation
buzz copied to clipboard

fix(mobile): backfill presence from relay snapshots

Open tkors opened this issue 3 months ago • 3 comments

Summary

  • subscribe to live presence before querying tracked DM identities
  • backfill and periodically refresh presence from the relay Redis snapshot
  • preserve newer live heartbeats across snapshot races, transient Redis misses, reconnects, relay/account changes, and provider disposal

Test Plan

  • [x] just mobile-check
  • [x] flutter test test/features/profile/presence_cache_provider_test.dart (13 passed)
  • [x] just mobile-test (1029 passed, 1 skipped)

tkors avatar Aug 02 '26 19:08 tkors

@claude review

tkors avatar Aug 02 '26 19:08 tkors

Addressed the first review pass: transient empty snapshots no longer overwrite fresh positive presence, snapshot timestamps now participate in ordering, overlapping snapshots are serialized, and relay/account isolation has explicit coverage. Full mobile check and all 1,028 tests pass.

@claude review

tkors avatar Aug 02 '26 19:08 tkors

Final lifecycle hardening is now on the branch: in-flight HTTP snapshots are invalidated on provider disposal, with a regression test. Targeted presence suite: 13/13; full mobile suite: 1,029 passed, 1 skipped; analyze clean.

@claude review

tkors avatar Aug 02 '26 19:08 tkors