Skip to content

[playground] Add total pages in pagination #758

@leoguillaume

Description

@leoguillaume

Context – why is this issue relevant?

The API pagination convention has evolved to include a new total field indicating the total number of available items.

Currently, the Playground UI does not leverage this information. Pagination relies on navigating until no more results are returned, meaning users only discover they’ve reached the last page by attempting to go further.

With the new total attribute, the UI can compute and display the total number of pages and provide clearer navigation feedback.


Objective – what is the aim of this issue?

Update the Playground UI to support the new pagination convention by:

  • Using the total field returned by the API.
  • Computing the total number of pages.
  • Displaying the current page number relative to the total number of pages.

Expected outcomes – what do we expect at the end of this issue (concrete outcomes)?

Outcomes

  • The Playground UI reads and uses the total field from paginated API responses.
  • The total number of pages is computed (total / page_size).
  • The UI displays pagination in the format:
    Page X / Y
  • Navigation controls (next/previous) behave consistently with known page limits.

Acceptance criteria

  • The UI correctly parses the total field from API responses.
  • The total number of pages is accurately calculated and displayed.
  • Users can see both the current page and total pages.
  • Pagination no longer relies on probing the last page to detect the end.
  • No regression in existing pagination behavior.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions