Skip to content

Empty rooms (purged by retention policy) are stuck at the top when sorting by "Activity" #31152

@tristanlins

Description

@tristanlins

Steps to reproduce

This is difficult to reproduce without a specific server setup, but the environment is key:

  1. Configure a Synapse server with a short, aggressive global retention policy (e.g., max_lifetime: 30d).

  2. Have a Direct Message (DM) chat with another user.

  3. Wait for the retention policy to purge all messages from that DM room (i.e., wait 30 days without new messages).

  4. In Element, set the room list sorting to "Activity".

  5. Observe that this now-empty DM room moves to the top of the room list.

  6. Receive new messages in other rooms.

  7. Observe that the empty room remains at the top, above the rooms that just received new messages.

Outcome

What happened?

We are running a Synapse server with a strict, server-wide retention policy of 30 days. This frequently causes Direct Message (DM) rooms to be completely emptied of all messages.

When the room list in Element is sorted by "Activity", these empty rooms are incorrectly sorted to the very top of the list. They remain "stuck" at the top, even when new messages arrive in other rooms (e.g., team or project rooms).

This forces users to manually leave these empty rooms to maintain a usable, activity-sorted room list.

It seems the client's sorting logic interprets "a room with no messages" (or perhaps a null timestamp for the last event) as the "most recent" activity.

What did you expect?

Empty rooms, which have effectively zero (or the oldest possible) activity, should be sorted to the bottom of the room list when sorting by "Activity".

What happened instead?

Empty rooms are sorted to the top of the room list and remain stuck there, cluttering the view of active chats.

Operating system

Fedora Linux 43 / Brave Browser 1.48.132

Application version

Element Desktop 1.12.2 / Element Web 1.12.2

How did you install the app?

Flathub

Homeserver

Private Synapse v1.141.0

Will you send logs?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Room-ListO-UncommonMost users are unlikely to come across this or unexpected workflowS-MajorSeverely degrades major functionality or product features, with no satisfactory workaroundT-Defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions