element-hq / element-x-ios

Next generation Matrix client for iOS built with SwiftUI on top of matrix-rust-sdk.
https://element.io/labs/element-x
GNU Affero General Public License v3.0
421 stars 100 forks source link

The Visible Rooms SS list isn't correctly preloading history. #1764

Open ara4n opened 1 year ago

ara4n commented 1 year ago

Steps to reproduce

  1. Open the app
  2. Scroll down a page's worth of roomlist
  3. Wait 30s or some reasonable length of time for visiblerooms to preload the history for the rooms shown
  4. Open the room
  5. Observe no preloaded history; instead just the most recent message + a spinner while the client calls /messages to pull in the last page of scrollback

I suspect this is because the SS Proxy's visible rooms implementation is just buggy, and will be replaced by a new /timeline API shortly, but filing this here for the sake of completeness

Separately, i've seen some situations where the room preview is stale (showing state from the room cache rather than from SS). Unsure whether that's related or not, and if there's some place where we're still relying on visible-rooms to populate room previews.

Outcome

What did you expect?

Room history is preloaded for the rooms you're looking at in the room list.

What happened instead?

Room history is almost never preloaded.

Your phone model

No response

Operating system version

No response

Application version

390

Homeserver

No response

Will you send logs?

No

ara4n commented 1 year ago

(this is something of a dup of https://github.com/vector-im/element-x-ios/issues/1569, but i'm not reopening that one given the cause may be different)