Skip to content

Add experimental support for MSC4308: Thread Subscriptions extension to Sliding Sync when MSC4306 and MSC4186 are enabled. #18695

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 12 commits into
base: develop
Choose a base branch
from

Conversation

reivilibre
Copy link
Contributor

Closes: #18436

Implements: matrix-org/matrix-spec-proposals#4308

Follows: #18674

This pull request is intended for commit-by-commit review.

  1. Update simplified sliding sync docstring

  2. spelling

  3. Add models for Thread Subscriptions extension to Sliding Sync

  4. Add overload for gather_optional_coroutines/6

  5. Add thread subscriptions position to StreamToken

  6. Add subscribed and automatic to get_updated_thread_subscriptions_for_user

  7. Implement MSC4308

  8. Put MSC4308 behind the MSC4306 feature flag

@reivilibre reivilibre changed the title Add experimental support for [MSC4308: Thread Subscriptions extension to Sliding Sync](https://github.com/matrix-org/matrix-spec-proposals/pull/4308) when [MSC4306: Thread Subscriptions](https://github.com/matrix-org/matrix-spec-proposals/pull/4306) and [MSC4186: Simplified Sliding Sync](https://github.com/matrix-org/matrix-spec-proposals/pull/4186) are enabled. Add experimental support for MSC4308: Thread Subscriptions extension to Sliding Sync when MSC4306 and MSC4186 are enabled. Jul 18, 2025
@reivilibre reivilibre force-pushed the rei/ssext_threadsubs branch 2 times, most recently from e40211b to 7634587 Compare July 21, 2025 16:13
@reivilibre reivilibre force-pushed the rei/ssext_threadsubs branch from 7634587 to ba41526 Compare July 21, 2025 17:32
@reivilibre reivilibre marked this pull request as ready for review July 21, 2025 20:13
@reivilibre reivilibre requested a review from a team as a code owner July 21, 2025 20:13
Copy link
Contributor

@MadLittleMods MadLittleMods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I have looked things over but haven't given everything a proper review-level scrutiny)

Comment on lines +89 to +90
May clamp the `to_token` and return a new, earlier, one to replace it, if some
of the extensions are limited to sending less data down sync.
Copy link
Contributor

@MadLittleMods MadLittleMods Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not do this sort of thing. This is the sort of pattern that made legacy /sync complex, brittle, and unpredictable.

What's spurring on this change?

Paginating incremental sync is something unsolved in the Sliding Sync MSC and I don't think we should solve it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention of this is we don't want to have to fetch and send an unbounded number of thread subscriptions down to the client.

How else would you suggest doing this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One option is to have the limit work how timeline_limit works. We pass back messages up to the timeline_limit and a prev_batch token to paginate back from there. Hence my comment about an API endpoint to paginate thread subscriptions -> matrix-org/matrix-spec-proposals#4306 (comment)

@reivilibre reivilibre requested a review from MadLittleMods July 23, 2025 10:25
@MadLittleMods MadLittleMods removed their request for review July 23, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Threads 2.0: Design and implement a sliding sync extension for threads
2 participants