feat(admin): paginate audit logs - #1241
Merged
mftee merged 1 commit intoAug 26, 2026
Merged
Conversation
Contributor
|
@lovesmilesmall-hue is attempting to deploy a commit to the Mftee's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@lovesmilesmall-hue Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
mftee
approved these changes
Aug 26, 2026
mftee
left a comment
Contributor
There was a problem hiding this comment.
No merge conflicts with main. Audit log pagination looks good - approving.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1177
Closes #1174
Closes #1175
Closes #1176
Replaces hard-coded audit-log rows with the existing paginated
GET /admin/access-logscontract and limits each request to 20 records. The page now passes the documented filters, renders truthful loading/error/empty states, and exposes previous/next controls only when the backend reports multiple pages.Why
The audit-log page previously rendered fabricated rows and had no bound on DOM growth, despite the backend already providing
page,limit,total, andtotalPages. Using that existing endpoint and contract prevents the browser from rendering the full access-log history at once and avoids presenting sample data as production audit data.What was built
frontend/app/(protected)/admin/audit-logs/page.tsxfrontend/test-utils/admin-audit-logs.test.tsxlimit=20request, bounded first-page rendering, pagination visibility, and loading the next bounded page.Integration changes outside
frontend/app/(protected)/admin/audit-logs/No unrelated files modified. The page's previous mock data and server-only implementation were replaced because they could not satisfy the production pagination acceptance criterion.
Acceptance criteria coverage
frontend/app/(protected)/admin/audit-logs/page.tsx— fixedPAGE_SIZE = 20, APIlimit=20, and page-only rendering;frontend/test-utils/admin-audit-logs.test.tsx— 20-row bound and next-page request)Deliberately deferred
None.
Test plan
npm test— not run per requestnpm run typecheck— not run per requestnpm run lint— not run per requestnpm run build— not run per requestEnv vars / Notes
No new environment variables or public API surfaces. The page uses the existing
NEXT_PUBLIC_API_URLconvention and the existing backend endpoint documented infrontend/app/(protected)/admin/audit-logs/README.md.