Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Room is stuck as unread if the most recent event is not visible. #1479

Closed
ara4n opened this issue Aug 11, 2023 · 10 comments
Closed

Room is stuck as unread if the most recent event is not visible. #1479

ara4n opened this issue Aug 11, 2023 · 10 comments
Labels
O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue

Comments

@ara4n
Copy link
Member

ara4n commented Aug 11, 2023

Steps to reproduce

  1. Find a room where the most recent events are not visible (e.g. i have one here with a reaction and then an edit)
  2. The room is shown as unread in EIX in the room list
  3. View it
  4. Go back to the room list
  5. Room is still shown as unread

==> stuck unread. EW would be proud.

Outcome

What did you expect?

No stuck unread messages.

What happened instead?

Stuck unread.

Your phone model

No response

Operating system version

No response

Application version

339

Homeserver

No response

Will you send logs?

Yes

@ara4n ara4n added the T-Defect label Aug 11, 2023
@ara4n
Copy link
Member Author

ara4n commented Aug 11, 2023

Have sent a video on the rageshake.

@ara4n
Copy link
Member Author

ara4n commented Aug 11, 2023

p.s. i only started seeing these in the last few days, so it may be a recent regression.

@ara4n
Copy link
Member Author

ara4n commented Aug 14, 2023

@pixlwave says this is because started sending read receipts when we thought the user read a message, to match EAX (rather than as soon as the room is opened). so we need to be smarter about when to send them.

@Velin92 Velin92 added S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue labels Aug 16, 2023
@bnjbvr
Copy link
Member

bnjbvr commented Feb 13, 2024

matrix-org/matrix-rust-sdk#3119 should help with this, as it provides a method to mark a room as read (that sends a read receipt to the latest event, be it visible or not in the timeline). Let's see how it goes after the apps update the SDK.

@Velin92
Copy link
Member

Velin92 commented Feb 14, 2024

Fixed in the latest nighty

@Velin92 Velin92 closed this as completed Feb 14, 2024
@manuroe
Copy link
Member

manuroe commented Feb 14, 2024

Reopened because there is still a case where we have the bug. If the last event is a threaded message, the room stays unread. See the last rageshake.

@manuroe manuroe reopened this Feb 14, 2024
@bnjbvr
Copy link
Member

bnjbvr commented Feb 15, 2024

@manuroe The rageshake doesn't include any compute_unread_counts log lines, which is weird because it says it should (matrix_sdk_base::read_receipts=trace), so I can't investigate the failure further, unfortunately.

@bnjbvr
Copy link
Member

bnjbvr commented Feb 16, 2024

The latest rageshake from @manuroe (thanks!) shows it's the issue solved by MSC4102. in https://rageshakes.element.io/api/listing/2024-02-16/140348-MQXGNP3J/logs-0001.log.gz :

2024-02-16T13:59:28.720777Z TRACE matrix_sdk_ui::timeline: sending receipt | crates/matrix-sdk-ui/src/timeline/mod.rs:721 | spans: mark_as_read{receipt_type="m.read" room_id="!mQphBNsunwlFWImZCg:matrix.org"} > send_single_receipt{receipt_type="m.read" thread=Unthreaded event_id="$yFQnSiMXamdyhLHPocwFWzrIWfIFocEM6iTdzL8iNKA" room_id="!mQphBNsunwlFWImZCg:matrix.org"}

We're sending an unthreaded read receipt for $yFQnSiMXamdyhLHPocwFWzrIWfIFocEM6iTdzL8iNKA.

The next sync returns:

2024-02-16T13:59:31.176781Z [...]
"$yFQnSiMXamdyhLHPocwFWzrIWfIFocEM6iTdzL8iNKA":{"m.read":{"@manu:matrix.org":{"ts":1707322244119,"thread_id":"$iYu51tMDt1g35qqgLPc5fs1jLDQYfNPdiucWoHIWjaM"}}}}}

So the unthreaded receipt is not forwarded, and we get the threaded receipt instead, which EX ignores, resulting in the stuck unread.

@anoadragon453
Copy link
Member

A fix for this has merged into Synapse and is expected to be included in the v1.102.0 release. v1.102.0rc1, which includes the fix, has been deployed to matrix.org as of yesterday.

@manuroe
Copy link
Member

manuroe commented Mar 27, 2024

We should be good on this now

@manuroe manuroe closed this as completed Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Needs-Rust This issue needs a Rust SDK change. It must have a link to a Rust SDK issue
Projects
None yet
Development

No branches or pull requests

6 participants