#971 — Cursor-based Pagination for Master Activities API
Repo: Twill-AI/facade State: open | Status: open Assignee: meliascosta, sparsh-twillpayments
Created: 2026-02-02 · Updated: 2026-02-09
Description
To support the real-time “Activity Inbox” in the Master Dashboard, we need to transition the Activities API from offset-based pagination to cursor-based pagination. The current page and limit model causes duplicate entries and shifting indices when new events are added to the feed via WebSockets.
Requirements
- Update Endpoint:
GET /activities(and any related sub-endpoints). - New Parameter: Support a
cursorparameter (e.g.,last_item_idor a base64 encoded string). - Logical Behavior: When a
cursoris provided, the API should return the next batch of items strictly older than the reference point, regardless of how many new items have been prepended to the top of the list since the last request. - Response Payload: Include a
next_cursororpaginationobject in the response to indicate the reference point for the subsequent “Load More” request. - Counts Endpoint: Add activity counts (by type/partner) as discussed here
Also, let the endpoint return merchant name and partner name.
Notes
Add implementation notes, blockers, and context here
Related
Add wikilinks to related people, meetings, or other tickets