element-x-ios icon indicating copy to clipboard operation
element-x-ios copied to clipboard

sss: timeline resets when sync completes, causing a scroll jump

Open ara4n opened this issue 1 year ago • 2 comments

Steps to reproduce

  1. launch app
  2. open room and scroll back to read scrollback while it syncs
  3. once sync completes and spinner stops, the timeline resets and scrolljumps you unceremoniously to the bottom of the timeline

Outcome

What did you expect?

never scrolljump, never visibly reset the timeline

Your phone model

No response

Operating system version

No response

Application version

683

Homeserver

No response

Will you send logs?

Yes

ara4n avatar Aug 19 '24 18:08 ara4n

in fact, it's worse than this. most of the time when i open a room on build 686, the timeline resets while i'm reading scrollback. it's like it's resetting once a subscription or /messages completes or something. having the UI disappear and reappear and fling you back to the bottom of the timeline while you're trying to read it is 😬

ara4n avatar Aug 24 '24 08:08 ara4n

this continues to be a really nasty wart with sss (especially if it conspires with #3214 and similar to lose msgs entirely)

ara4n avatar Aug 30 '24 08:08 ara4n

I continuen to get this almost every time i open a room on sss. It makes the app feel distinctly flakey.

ara4n avatar Oct 03 '24 23:10 ara4n

This issue should disappear in most cases thanks to the the event cache persistent storage we've been implementing for a few months now. In particular, we will not reset the timeline anymore, after receiving a "limited" (gappy) timeline, thanks to the ability to fill in gaps later on.

The only remaining cases where such a reset would happen are the following:

  • an internal channel has been clogged, which is an implementation detail surfacing as a bug: this shouldn't happen in general, as we've taken measures to ensure those internal channels would be large enough for most common situations,
  • there's been changed in the ignore list of the current logged-in user (e.g. another user was ignored or un-ignored). In the case of the ignored -> unignored transition, we can't know what messages we've missed, so all rooms will be cleared, resulting in a reset of the timeline, as a cautionary measure.

bnjbvr avatar Feb 04 '25 14:02 bnjbvr

Some updates on this:

We had share_pos enabled for a while. So, SSS expiration should no more create this problem.

There is no more scroll jumps when you resume the app if no timeline gap happened. But if there is a timeline gap, the displayed timeline will be reset and the app will jump to the bottom.

From the user's perspective, there will be no jumps if less than 20 events were sent in the room since the last vist. With more than 20 new events, the timeline will jump to the bottom. Element Classic has the same behavior.

We would like to introduce the display of timeline gaps in EX. It is a project on its own: Gaps in timelines block older content loading from the event cache, massively undermining its benefits.

@ara4n have you seen this issue recently? Are you ok to close it and to consider that next steps will happen with #3872 ?

manuroe avatar Sep 11 '25 13:09 manuroe

happy to close; i've either grown numb to it or it's got better. will keep an eye out.

ara4n avatar Sep 11 '25 14:09 ara4n