matrix-org / matrix-org/matrix-rust-sdk

Add an API for processing timeline item appearance.

Open
#2,407 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-Timeline
Dominant language
Rust
Stars
2.3k
Forks
500
Avg merge
1d 16h
Merged PRs (30d)
106

Description

Element X Android and iOS each have their own implementation for tracking when to send read receipts based on items appearing when scrolling the timeline and as the items collection is updated. It includes various checks for event based items vs virtual items and likely doesn't do the right thing for local echoes etc:

https://github.com/vector-im/element-x-android/pull/713
https://github.com/vector-im/element-x-ios/pull/1426

It would be really nice to have an API that allows a client to inform the SDK of the last visible item in the timeline as it changes. The SDK could then track whether items have been read, sending read receipts as necessary whilst the user is scrolling and receiving new messages. This would additionally help from a testing perspective whilst its not possible to properly mock the timeline items from Rust for testing the current implementations (at least on iOS anyway).

One stretch goal for this could also be to include handling for the fully-read marker too, but I believe that needs some understanding of both the first and last visible items to be handled correctly.

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 by reviewing the linked Element X Android and iOS pull requests and the Rust SDK's existing timeline and read-receipt APIs. Define the client-facing appearance API and its handling of event items, virtual items, local echoes, scrolling updates, and receipt state; the issue's stretch goal also mentions the fully-read marker.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.