element-hq / element-hq/element-web
Favorite room action feels very sluggish and does not always update
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Problem
When favoriting or unfavoriting a room, it takes multiple seconds before the room list updates. I assume this is due to us waiting for requests to fly around but there seems to be something more weird going on.
Often times, I have to do the favorite action multiple times (even waiting for `/sync` to settle) in between. I can see the `m.favourite` request succeed but the UI does not update.
Relevant requests:
- `PUT /_matrix/client/r0/user/%40madlittlemods%3Amatrix.org/rooms/!abc/tags/m.favourite`
- `DELETE /_matrix/client/r0/user/%40madlittlemods%3Amatrix.org/rooms/!abc/tags/m.favourite`

### Potential solutions
When favoriting rooms, optimistically update the UI. Or at the minimum, update the UI when we see the `m.favourite` requests succeed. (local echo)
### Related issues
- https://github.com/vector-im/element-web/issues/14302
### Logs
Logs in case that helps: https://github.com/matrix-org/element-web-rageshakes/issues/11073
---
- Favorite room action is slow
Contributor guide
Assessment
This issue has not been assessed yet.