Skip to content

Verify pagination.total semantics in ?group_by=maven_component response (after artifact-keeper#701) #417

@brandonrc

Description

@brandonrc

Source

R3 adversarial review of PR for #254 + #330 (artifact-browser grouping).

Issue

maven-component-list.tsx:80 renders "Showing N of M components" using pagination.total from the ?group_by=maven_component response.

If the backend sets pagination.total = components.length: footer is correct.

If the backend sets pagination.total to the raw artifact count (e.g., 500 raw artifacts that group into 100 components × 5 files each): footer reads "Showing 100 of 500 components" which is misleading — the user sees 100 components, not 100 of 500 components.

The current frontend test mocks (src/lib/api/__tests__/artifacts.test.ts:122-128) assume pagination.total === components.length, but that hasn't been confirmed against the live backend (artifact-keeper#701).

Fix

Confirm backend behavior, then either:

  • (a) Frontend assumption holds → close as no-op.
  • (b) Backend reports raw count → either change backend to report component count when group_by is set, OR change frontend to use components.length for the footer denominator.

Acceptance criteria

  • Behavior confirmed against live backend
  • Footer copy matches the response semantics
  • If mismatch found, integration test added to pin the agreed semantic

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions