buzz
buzz copied to clipboard
fix(mobile): backfill presence from relay snapshots
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)
@claude review
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
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