Skip to content

feat(ui): server-side pagination for policy evaluations table#141

Merged
hashedone merged 5 commits into
mainfrom
feat/policy-evaluations-pagination
May 18, 2026
Merged

feat(ui): server-side pagination for policy evaluations table#141
hashedone merged 5 commits into
mainfrom
feat/policy-evaluations-pagination

Conversation

@hashedone
Copy link
Copy Markdown
Contributor

Summary

  • Policy evaluations table now fetches pages of 25 rows from the server using limit/offset params (the API already supported these)
  • Backend response changed from Vec<PolicyEvaluationResponse> to { items, total } — adds a parallel COUNT query so the frontend knows the total rows for correct page count display
  • Frontend shows a pagination footer matching the existing DataTable component (prev/next buttons, "X–Y of Z" label); filters (result, policy) reset to page 1 on change

Test plan

  • Open a repo detail page with policy evaluations — pagination footer should appear with correct row counts
  • Navigate pages using prev/next buttons — each click fetches the next/previous page from the server
  • Change result or policy filter — page resets to 1 and re-fetches
  • With fewer rows than page size — pagination footer still shows, single page, buttons disabled correctly
  • Existing commits table and policies table unaffected

🤖 Generated with Claude Code

The policy activity table now fetches pages of 25 rows from the server
(using the existing limit/offset API params) and shows a pagination
footer matching the DataTable component. The backend response was
changed from a plain array to { items, total } so the frontend knows
the total row count for correct page count display.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread web/src/routes/orgs/[slug]/repos/[id]/+page.svelte Outdated
hashedone and others added 4 commits May 18, 2026 12:50
Matches the DataTable pagination style used on commits: shows Per page
10/25/50 buttons with the active size highlighted, a separator, then
prev/next nav.  evalPageSize is now reactive state so changing it
triggers a fresh server fetch at offset 0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hashedone hashedone merged commit f5b3da2 into main May 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant