Skip to content

feat(sync): Allow setting a custom Sliding Sync connection ID and timeline limit on RoomListService#6289

Open
Johennes wants to merge 1 commit intomatrix-org:mainfrom
Johennes:johannes/sync-service-customisation
Open

feat(sync): Allow setting a custom Sliding Sync connection ID and timeline limit on RoomListService#6289
Johennes wants to merge 1 commit intomatrix-org:mainfrom
Johennes:johannes/sync-service-customisation

Conversation

@Johennes
Copy link
Contributor

@Johennes Johennes commented Mar 14, 2026

This allows setting the roomlist service's connection ID and timeline limit over FFI. We've found this to be helpful when using the service from an iOS share extension simultaneously to the main app.

  • I've documented the public API Changes in the appropriate CHANGELOG.md files.
  • This PR was made with the help of AI.

…eline limit on `RoomListService`

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
@Johennes Johennes force-pushed the johannes/sync-service-customisation branch from 5d2c04c to 69520be Compare March 14, 2026 18:44
@Johennes Johennes marked this pull request as ready for review March 14, 2026 18:55
@Johennes Johennes requested a review from a team as a code owner March 14, 2026 18:55
@Johennes Johennes requested review from Hywan and removed request for a team March 14, 2026 18:55
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 14, 2026

Merging this PR will improve performance by 68.28%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 49 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation Restore session [memory store] 282 ms 167.6 ms +68.28%

Comparing Johennes:johannes/sync-service-customisation (5d2c04c) with main (acda2e8)

Open in CodSpeed

@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.92%. Comparing base (acda2e8) to head (69520be).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk-ui/src/sync_service.rs 70.00% 8 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6289   +/-   ##
=======================================
  Coverage   89.91%   89.92%           
=======================================
  Files         374      374           
  Lines      102613   102651   +38     
  Branches   102613   102651   +38     
=======================================
+ Hits        92267    92307   +40     
- Misses       6783     6790    +7     
+ Partials     3563     3554    -9     

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

@Hywan
Copy link
Member

Hywan commented Mar 17, 2026

Thank you for the contribution.

We've found this to be helpful when using the service from an iOS share extension simultaneously to the main app.

Why is it useful? Why do you need a different name?

@Johennes
Copy link
Contributor Author

Why is it useful? Why do you need a different name?

We've ran into what we think is interference between the main app sync and the sync from our share extension where both tread on the same pos simultaneously then leading to an infinite loop where one of them keeps making requests with invalid positions.

IIUC sharing the position isn't fully guarded by the cross-process lock, so maybe this is why.

//.share_pos() // TODO: This is racy, needs cross-process lock :')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants