matrix-org / matrix-org/matrix-rust-sdk

feat(ui): Room List should have a new sorter to put room with local event to the top

Open
#5,365 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.3k
Forks
500
Avg merge
1d 16h
Merged PRs (30d)
106

Description

We want the room list to have a new sorter that puts all rooms with a local event/local echoes to the top of the list.

**Technical challenge** — A `Room` doesn't have a pointer to a `RoomSendQueue`, so it's not possible to connect the two in a room list sorter, at least not in a clean way. However, in https://github.com/matrix-org/matrix-rust-sdk/issues/4112, we will store the `LatestEvent` in the `RoomInfo` for caching purposes. (This mechanism will already trigger a `RoomList` update.) We may abuse this to store a special information indicating it's a local event, and thus we will be able to implement such sorter.

---

- Discussion https://github.com/element-hq/customer-success/issues/366#issuecomment-2758344046

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with issue #4112 and inspect the RoomInfo and LatestEvent caching behavior described there, then trace how RoomList updates are triggered. The work is done when the room list can identify rooms with local events or local echoes and sort those rooms to the top without a Room-to-RoomSendQueue pointer.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.