Page MenuHomePhabricator

[web] Fix fetching messages in messages list
ClosedPublic

Authored by tomek on Tue, Oct 8, 8:35 AM.
Tags
None
Referenced Files
F2983689: D13634.id44970.diff
Wed, Oct 16, 9:58 AM
F2981643: D13634.id44969.diff
Tue, Oct 15, 11:42 PM
F2978223: D13634.id45058.diff
Tue, Oct 15, 12:08 PM
Unknown Object (File)
Mon, Oct 14, 3:10 PM
Unknown Object (File)
Sun, Oct 13, 4:12 PM
Unknown Object (File)
Sun, Oct 13, 7:56 AM
Unknown Object (File)
Thu, Oct 10, 6:12 AM
Unknown Object (File)
Thu, Oct 10, 6:11 AM
Subscribers
None

Details

Summary

When there were more than 40 messages in a thick thread, fetching more messages sometimes resulted in fetching more batches at once and jumping back a multiple of 20 messages. This issue was caused by an old bugfix that was fixing an issue where an empty space was displayed after opening a thread, when it had more than 20 messages https://github.com/CommE2E/comm/commit/0639b7628833dd318f58fb7ed36538dac75336a4. The solution to this is to apply this bugfix only when we initially open the page - this can be tested by checking if a scroll position is 0.

https://linear.app/comm/issue/ENG-9097/fetching-new-messages-in-message-list-is-glitchy-when-it-happens

Test Plan

Created a thread with 200 messages. Tested on Chrome and Safari.

  1. Opened the web page and scrolled slowly near every 20th messages. The original issue happened about 50% of the times, so I made sure to test it a couple of times. Didn't experience any glitches.
  2. Zoomed out so that more than 20 messages can be seen at once and opened the web app. Immediately after opening the app more messages were fetched.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable