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

Thread replies do not local echo as expected

Open
#3,464 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

When sending an event as a reply to a thread using the default "chronological" pendingEventOrdering, I'd expect the reply to appear in the thread's timeline as soon as sendMessage is called. In actuality, with matrix-js-sdk@26.0.1, the event only shows up in the thread's timeline about half a second after the sendMessage promise resolves.

(I'd also be fine with the local echo appearing in the thread's containing Room, but no dice there either.)

Here is a branch of a repo that I think has a minimal reproducing example, although it's a little noisy due to many Thread.updates called – I believe related to #3463. (I don't think this is caused by the same bug as #3463 though, as this happens for me in threads with fewer than 11 events.)

Here are logs of me running this code:
Screen Shot 2023-06-11 at 7 19 31 PM

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 the minimal reproducing example referenced in the issue, then trace sendMessage with pendingEventOrdering set to chronological and the thread timeline update. Compare promise resolution with the delayed local echo; done means the reply appears in the thread timeline immediately when sendMessage resolves.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.