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

When calling app.bsky.feed.getActorFeeds a cursor is returned even though the feed list cannot be paginated #1176

Closed
jasonculverhouse opened this issue Jun 7, 2023 · 2 comments · Fixed by #1178
Labels
bug Something isn't working

Comments

@jasonculverhouse
Copy link

jasonculverhouse commented Jun 7, 2023

Describe the bug

When calling app.bsky.feed.getActorFeeds a cursor is returned even though the feed list cannot be paginated

To Reproduce

Steps to reproduce the behavior:

  1. curl 'https://bsky.social/xrpc/app.bsky.feed.getActorFeeds?actor=did:plc:cndfx4udwgvpjaakvxvh7wm5&limit=30'

request the feed (only 2 are present) yet a cursor is returned.

{
  "cursor": "1686067091549::bafyreibe55je67svx26xsff76hlhn65zcpyask6rsoi6x5kok6sufxabdy",
  "feeds": [
    {
      "uri": "at://did:plc:cndfx4udwgvpjaakvxvh7wm5/app.bsky.feed.generator/flipboard-tech",
      "cid": "bafyreifnjzcl577uhqc7buftpym4feiul6ry5knigymrtm6f4xukpnvdui",
      "did": "did:web:bsky.flipboard.com",
      "creator": {
        "did": "did:plc:cndfx4udwgvpjaakvxvh7wm5",
        "handle": "flipeng.bsky.social",
        "viewer": {
          "muted": false,
          "blockedBy": false,
          "following": "at://did:plc:d4yzg3vadl536rkihgygkvv6/app.bsky.graph.follow/3juwgbo6mvv27",
          "followedBy": "at://did:plc:cndfx4udwgvpjaakvxvh7wm5/app.bsky.graph.follow/3jvfxutaw562t"
        },
        "labels": []
      },
      "displayName": "Flipboards's Tech feed",
      "description": "Curated by Flipboard's state of the art topics recommendation system.",
      "avatar": "https://cdn.bsky.social/imgproxy/7pOnAO_vkyST0Rw5bSuB3jvdyOz4jFQL0HJ6DS3QZMI/rs:fill:1000:1000:1:0/plain/bafkreigbeq7c4dvrlpoyhnvlitrqs56qroafwgkmy6kx6mo3aun7skskym@jpeg",
      "likeCount": 11,
      "viewer": {},
      "indexedAt": "2023-06-06T20:12:22.029Z"
    },
    {
      "uri": "at://did:plc:cndfx4udwgvpjaakvxvh7wm5/app.bsky.feed.generator/Flipboard-tech",
      "cid": "bafyreibe55je67svx26xsff76hlhn65zcpyask6rsoi6x5kok6sufxabdy",
      "did": "did:web:bsky.flipboard.com",
      "creator": {
        "did": "did:plc:cndfx4udwgvpjaakvxvh7wm5",
        "handle": "flipeng.bsky.social",
        "viewer": {
          "muted": false,
          "blockedBy": false,
          "following": "at://did:plc:d4yzg3vadl536rkihgygkvv6/app.bsky.graph.follow/3juwgbo6mvv27",
          "followedBy": "at://did:plc:cndfx4udwgvpjaakvxvh7wm5/app.bsky.graph.follow/3jvfxutaw562t"
        },
        "labels": []
      },
      "displayName": "Flipboards's Tech feed",
      "description": "Curated by Flipboard's state of the art topics recommendation system.",
      "avatar": "https://cdn.bsky.social/imgproxy/7pOnAO_vkyST0Rw5bSuB3jvdyOz4jFQL0HJ6DS3QZMI/rs:fill:1000:1000:1:0/plain/bafkreigbeq7c4dvrlpoyhnvlitrqs56qroafwgkmy6kx6mo3aun7skskym@jpeg",
      "likeCount": 0,
      "viewer": {},
      "indexedAt": "2023-06-06T19:58:11.728Z"
    }
  ]
}

Expected behavior

no cursor is present in the response if there are no more results.

Details

  • Operating system:
  • Node version:

Additional context

@jasonculverhouse jasonculverhouse added the bug Something isn't working label Jun 7, 2023
@jasonculverhouse jasonculverhouse changed the title When calling app.bsky.feed.getActorFeeds a cursor is returned even though the the feed list cannot be paginated When calling app.bsky.feed.getActorFeeds a cursor is returned even though the feed list cannot be paginated Jun 7, 2023
@jasonculverhouse
Copy link
Author

You can repo this in the web app If you just click back and forth on the custom feeds it keeps adding feeds again and again

image

@devinivy
Copy link
Collaborator

devinivy commented Jun 7, 2023

Thanks for the report! This looks like an issue with normalizing the createdAt times during indexing. The cursor is considered accurate, but that result should be omitted from the next page rather than included. Have a PR up with the fix here: #1178.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants