Skip to content
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

Only show world_readable rooms in the room directory #276

Conversation

MadLittleMods
Copy link
Contributor

@MadLittleMods MadLittleMods commented Jun 28, 2023

Only show world_readable rooms in the room directory

Happens to address part of #271 but made primarily as a follow-up to #239

Dev notes

Only fetch world_readable rooms from the room directory

Only 42% rooms on the matrix.org room directory are world_readable which means we will get pages of rooms that are half-empty most of the time if we just naively fetch 9 rooms at a time.

Ideally, we would be able to just add a filter directly to /publicRooms in order to only grab the world_readable rooms and still get full pages but the filter option doesn't allow us to slice by world_readable history visibility.

Instead, we have to paginate until we get a full grid of 9 rooms, then make a final /publicRooms request to backtrack to the exact continuation point so next page won't skip any rooms in between.


We had empty spaces in the grid before because some rooms in the room directory are private which we filtered out before. But that was a much more rare experience since only 2% of rooms were private .

Room creation -> Room directory lacks read-after-write consistency

Tracked by matrix-org/synapse#15526

This is why we added waitForResultsInHomeserverRoomDirectory(...). We first ran into this problem in #208 (comment)

Random

npm run test-e2e-interactive -- --grep "pagination is seamless"

Todo

  • Paginate until we get a full grid of 9 rooms
  • Add test to make sure pagination is seamless

@MadLittleMods MadLittleMods added T-Enhancement New feature or request A-room-directory Room directory landing page where you can explore the list of rooms A-backend Related to the backend Node.js server pieces labels Jun 28, 2023
@MadLittleMods MadLittleMods marked this pull request as ready for review June 30, 2023 08:01
@MadLittleMods MadLittleMods merged commit dd2cd91 into main Jun 30, 2023
MadLittleMods added a commit that referenced this pull request Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend Related to the backend Node.js server pieces A-room-directory Room directory landing page where you can explore the list of rooms T-Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant