Sort and limit application analytics partner table#4138
Conversation
- Sort partner rows by the selected application event stage (visits, starts, submissions, approvals) via a new optional `event` query param - Limit results to the top 100 partners - Paginate the table client-side (10 per page) instead of rendering all rows - Preserve DB sort order in the API response mapping
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds an optional ChangesStage-based partner analytics sorting
Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant Table as ApplicationsPartnersTable
participant Route as Analytics API Route
participant DB as Prisma/Database
Table->>Route: GET analytics request (event=stage)
Route->>Route: parse event, resolve sortColumn via STAGE_SORT_COLUMN
Route->>DB: groupBy referredByPartnerId orderBy sortColumn._count
DB-->>Route: aggregated event rows
Route->>Route: build partnersById lookup, resolve partner per row
Route-->>Table: formatted partner analytics results
Table->>Table: slice results for current page, render sorted by stage
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
eventquery paramSummary by CodeRabbit
New Features
Bug Fixes