Skip to content

GetManyClients paging defaults are wrong and NextUrl double-counts #51

Closed

Description

@brinehart

File: core/csharp/MicroZen.Api/Services/ClientsGrpcService.cs:30-47

What this is: Pagination in GetManyClients.

Problem: var page = request.Page > 0 ? request.Page : 10; treats Page as a page size, defaulting to 10 — but it is a page number everywhere else (NextUrl = page={request.Page + 1}). So Take(page) takes "page-number" rows, and Skip(skip) uses a raw Skip field that is never multiplied by page size. Paging returns overlapping/incorrect windows.

Fix: Separate page number from page size, compute Skip((page-1) * pageSize).Take(pageSize), and build NextUrl from the same variables.

If we skip it: Listing clients returns wrong, overlapping result pages.

Activity

  1. added
    Must FixBug, security, data loss, or breaks at expected load
    on Oct 24, 2026
  2. brinehart commented on Nov 2, 2026

    @brinehart
    CollaboratorAuthor

    Resolved by PR #86 (merged into main as commit c295a0f via epic PR #81). Fix: corrected GetManyClients paging (1-based page number, page size, consistent NextUrl).

  3. linked a pull request that will close this issuefix(api): correct GetManyClients paging (#51) #86on Nov 2, 2026
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

    Must FixBug, security, data loss, or breaks at expected load

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions