Cursor Pagination
When I scroll down to load the next page of my feed, why do a couple of posts I just saw show up again?
nextCursor pointing to the last row, inserting two new posts at the top does not shift where the next request starts, preventing duplicate items. However, cursor pagination cannot jump straight to page 8, so admin tables that require arbitrary page jumps still fit numbered pagination.You can say this to an AI Agent
Ready to paste into Cursor, Claude Code, or CodexSwitch the feed API from `page/offset` to cursor pagination: sort by `(created_at, id)` descending, return `items`, `nextCursor`, and `hasMore`, and index the sort columns. Verify by fetching batch 1, inserting 2 new items at the top, and fetching batch 2 with `nextCursor` to confirm zero duplicates or skipped items.
