Skip to content

feat(ui): New Room List filter: deduplicate_versions #5084

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

Merged
merged 3 commits into from
May 27, 2025

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented May 23, 2025

This patch adds the new deduplicate_versions. This new filter will filter out room versions that are outdated. Only the “active” versions are kept.

A room version is considered active if and only if:

  • the room is joined and has no successor,
  • the room is joined and has a successor room that is invited or knocked,
  • the room is left, invited, banned or knocked.

All other rooms are filtered out.


This patch makes the `SuccessorRoom` and `PredecessorRoom` types public.
Copy link

codecov bot commented May 23, 2025

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.

Project coverage is 85.82%. Comparing base (26afd89) to head (0e7836e).
Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
.../room_list_service/filters/deduplicate_versions.rs 47.05% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5084      +/-   ##
==========================================
- Coverage   85.83%   85.82%   -0.01%     
==========================================
  Files         333      334       +1     
  Lines       36158    36175      +17     
==========================================
+ Hits        31035    31047      +12     
- Misses       5123     5128       +5     

☔ 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.

@Hywan Hywan force-pushed the feat-ui-room-list-filter-active-version branch 2 times, most recently from ef68e88 to d588b09 Compare May 26, 2025 09:26
@Hywan Hywan marked this pull request as ready for review May 26, 2025 09:29
@Hywan Hywan requested a review from a team as a code owner May 26, 2025 09:29
@Hywan Hywan requested review from poljar and removed request for a team May 26, 2025 09:29
@bmarty
Copy link
Contributor

bmarty commented May 26, 2025

the room is left, invited, banned or knocked.

Do you mean

the room is invited or knocked.

?

@Hywan
Copy link
Member Author

Hywan commented May 26, 2025

No I don't mean that.

When a room is left, invited, banned or knocked, we don't see what's happening here, so we don't know if the room is tombstoned or not. Consequently, we consider this is the active version of the room. Those are cases are edge-cases to be honest.

@bmarty
Copy link
Contributor

bmarty commented May 26, 2025

OK your right, I was thinking of the api to return the room list to the application, but this is something else here.

@Hywan Hywan requested review from stefanceriu and removed request for poljar May 27, 2025 08:09
@stefanceriu stefanceriu self-requested a review May 27, 2025 11:25
Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

Noice 👍

Hywan added 2 commits May 27, 2025 13:46
This patch adds the new `deduplicate_versions`. This new filter will
filter out room versions that are outdated. Only the “active” versions
are kept.

A room version is considered active if and only if:

* the room is joined and has no successor,
* the room is joined and has a successor room that is invited or knocked,
* the room is left, invited, banned or knocked.

All other rooms are filtered out.
@Hywan Hywan force-pushed the feat-ui-room-list-filter-active-version branch from d588b09 to 0e7836e Compare May 27, 2025 11:46
@Hywan Hywan enabled auto-merge (rebase) May 27, 2025 11:46
@Hywan Hywan merged commit d24e269 into matrix-org:main May 27, 2025
42 checks passed
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.

3 participants