Skip to content

Add cursor pagination to chat sessions and messages #54

Description

@ExtraToast

What to build

Chat sessions and chat messages paginate using the estate cursor convention: an opaque cursor and a limit going in, an items array and a next cursor coming back.

These are the collections in this service that genuinely grow without bound. Bounded collections — workspaces, repositories, projects, credentials — are deliberately left alone, because turning every list into an envelope is a breaking change across the estate for collections that hold single digits.

The cursor shape is chosen over page and size because it stays stable under concurrent inserts, which is what an infinitely scrolling message list needs.

Acceptance criteria

  • Both collections accept a cursor and a limit and return a next cursor
  • Paging through a collection while items are being inserted neither duplicates nor skips
  • The convention is written down somewhere a future service can copy
  • The breaking change to these two operations is deliberate and their consumers are updated in step

Blocked by

  • Adopt the customizer and annotate the domain error codes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: agentsAgent runtime, agent APIs, tools, prompts, or UI.component: apiHTTP API, OpenAPI contract, or API client concern.priority: P3Low; backlog, cleanup, or opportunistic work.type: featureNew user-facing or operator-facing capability.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions