Skip to content

Simplify syncing the room list when receiving a push #4915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jmartinesp
Copy link
Member

Content

We were previously creating a timeline for every room that received a push notification and waiting until the event was resolved for it before stopping the sync. Creating this timeline could be causing the unexpected UTD increase we've seen lately since the UTD hook now applies to any timeline, so we'll just give the sync a few seconds to run in background instead.

Motivation and context

Try to avoid UTDs and false marked-as-unread rooms.

Tests

With the app on background:

  1. Receive a push.
  2. Check the opportunistic room list sync starts (you can search for 'opportunistic' in the logs).
  3. Check after ~10s the sync is stopped.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 14

Checklist

  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

We were previously creating a timeline for every room that received a push notification and waiting until the event was resolved for it before stopping the sync. Creating this timeline could be causing unexpected UTDs, so we'll just give the sync a few seconds to run in background instead.
@jmartinesp jmartinesp added the PR-Misc For other changes label Jun 23, 2025
@jmartinesp jmartinesp requested a review from a team as a code owner June 23, 2025 09:32
@jmartinesp jmartinesp requested review from bmarty and removed request for a team June 23, 2025 09:32
Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/ueYc8g

Copy link

codecov bot commented Jun 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.31%. Comparing base (7c79f8b) to head (6c0287a).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4915   +/-   ##
========================================
  Coverage    80.30%   80.31%           
========================================
  Files         2156     2156           
  Lines        57373    57360   -13     
  Branches      7225     7220    -5     
========================================
- Hits         46074    46066    -8     
+ Misses        8851     8850    -1     
+ Partials      2448     2444    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Misc For other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant