bluesky-social / atproto

Social networking technology created by Bluesky
Other
6.88k stars 486 forks source link

Mostly duplicate posts in the Discover feed with `cursor` pagination #3039

Open dliebner opened 3 days ago

dliebner commented 3 days ago

Describe the bug

Pagination in the Discover feed fails to produce a distinct, ordered list of posts when using cursors. Duplicate posts become increasingly prevalent with each subsequent page, making it nearly impossible to retrieve new unique posts after a certain point.

To Reproduce

Steps to reproduce the behavior:

  1. Go to bsky.app while logged out
  2. Open a network tab
  3. Scroll down as much as you can
  4. Keep scrolling
  5. Before long, you'll notice the network tab is going crazy making repeated requests to the feed and getting mostly posts that have already been returned by the feed. I assume the DDoS behavior is due to the client logic filtering out duplicate posts and continuing to try to fetch more since we're still at the bottom of the feed.

Expected behavior

Ideally, a unique, distinct list should be returned by the API as the fetcher uses a cursor to get additional pages. It seems the feed was engineered to allow for real-time reordering of the list, which is understandable, but in its current state the pagination is nearly unusable. It seems the cursor may not be functioning at all.

Details