matrix-org / matrix-org/matrix-js-sdk

`Thread` emits spurious `RoomEvent.TimelineReset` events

Open
#3,394 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.2k
Forks
704
Avg merge
1d 20h
Merged PRs (30d)
40

Description

`updateThreadMetadata` [emits](https://github.com/matrix-org/matrix-js-sdk/blob/b62fac9dadb845f517bf49494ffe6966501352e2/src/models/thread.ts#L484) a `RoomEvent.TimelineReset`, which causes `TimelinePanel` to replace any the events it has already loaded with a spinner. This is redundant work, and causes flaky cypress tests (see https://github.com/vector-im/element-web/issues/25417).

I'm having a hard time understanding why exactly that `TimelineReset` is being emitted; indeed, it's unclear what exactly the semantics of a `TimelineReset` are supposed to be.

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

Read src/models/thread.ts around updateThreadMetadata and inspect how TimelinePanel handles RoomEvent.TimelineReset; then review the linked Element issue and its Cypress-test context. Done means the event semantics are established and redundant timeline resets or spinners are no longer triggered without breaking required timeline updates.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.