element-hq / element-hq/element-meta

Notifications sidebar stuck on one room

Open
#1,003 1 comment 0 reactions 0 assignees View on GitHub
T-Defect
Dominant language
No language data
Stars
112
Forks
26
Avg merge
6h 6m
Merged PRs (30d)
4

Description

### Steps to reproduce

Quoting [rageshake](https://github.com/matrix-org/element-web-rageshakes/issues/20001):

>The notifications sidebar is stuck with old conversations from one individual, these notifications also appear in all other conversations. Attempted to jump start the issue by leaving the room and forgetting the room, and the results are that the messages won't load in the notification sidebar now. Was hoping to clear this out.

We also have several more rageshakes that look to be the same thing: [a](https://github.com/matrix-org/element-web-rageshakes/issues/19983), [b](https://github.com/matrix-org/element-web-rageshakes/issues/20091), [c](https://github.com/matrix-org/element-web-rageshakes/issues/20110)

The stacktraces all include:

```
Cannot read properties of null (reading 'getMyMembership')
```

@justjanne investigated and concluded:

> The error seems to occur in RoomNotifs.determineUnreadState, called by updateNotificationState in useUnreadNotifications

In this function we can see that we don't handle the case when room is null. We should fix this.

### Will you send logs?

Yes

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at RoomNotifs.determineUnreadState, which the issue identifies as being called by updateNotificationState in useUnreadNotifications. Inspect the null-room path and verify the notifications sidebar no longer remains stuck or shows the same notifications across rooms when a room is unavailable.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.