fix: Paginate PO history #105
No reviewers
Labels
No labels
bug
claude-failed
claude-pr
claude-queue
claude-working
epic
feature
interactive
portal
triaged
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: shad0w/pelagia-portal#105
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "claude/issue-104"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Automated fix by Claude Code for #104.
Closes #104
Review, merge, then create a release tag (vX.Y.Z) to deploy.
The /history page fetched a fixed first 200 POs in one flat table with no way to page further and no control over page size. Replace that with real pagination: - page.tsx: read page/perPage from searchParams; clamp perPage to 25/50/100 (default 25) and page to [1, totalPages] via a new shared resolvePagination helper. Swap the fixed take:200 for skip/take + a count() for totals. Replace the "first 200 results" notice with a footer ("Showing X-Y of N", Prev/Next, page indicator) that preserves all filters. Export PDF/CSV links stay on the full filtered set. - history-filters.tsx: add a Per-page dropdown; changing it or any filter resets to page 1 while preserving perPage in the URL. - lib/pagination.ts: dependency-free clamp/skip/take helper, unit-tested. Verified: type-check clean, 272 unit tests pass (9 new), skip/take windows and clamping checked against the test DB. Fixes #104