- Notifications
You must be signed in to change notification settings - Fork474
Add sorting options for Users list beyond "Signed Up At"#699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:dev
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@gitstart is attempting to deploy a commit to theStack Team onVercel. A member of the Team first needs toauthorize it. |
CLAassistant commentedMay 31, 2025
|
✨ No issues found! Your code is sparkling clean! ✨ 🗒️ View all ignored comments in this repo
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
PR Summary
Added sorting capabilities to the Users list by implementing sortable columns for Display Name, Primary Email, and Last Active timestamps.
- Added sorting functionality in
apps/dashboard/src/components/data-table/user-table.tsxfor Display Name, Primary Email, and Last Active columns - Implemented backend sorting logic in
apps/backend/src/app/api/latest/users/crud.tsxwith specialized handling for computed fields - Added order mapping in
crud.tsxto translate frontend column IDs to backend field names - Implemented in-memory sorting for
primary_emailandlast_active_atfields with cursor-based pagination - Potential performance consideration: In-memory sorting approach may impact performance with large datasets
💡 (1/5) You can manually trigger the bot by mentioning@greptileai in a comment!
2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings |Greptile
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
PR Summary
Added performance optimization for sorting large user lists by implementing database-level sorting instead of in-memory operations.
- Replaced in-memory sorting with SQL ORDER BY clauses in
apps/backend/src/app/api/latest/users/crud.tsxfor better scalability - Added database indexes on
display_name,primary_email, andlast_active_atcolumns to optimize sort performance - Updated query construction to handle NULL values appropriately in sort operations
- Maintained existing cursor-based pagination while leveraging database sorting
2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings |Greptile
Uh oh!
There was an error while loading.Please reload this page.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks for the contribution! Please sign the CLA
Uh oh!
There was an error while loading.Please reload this page.
Important
Adds sorting options for Users list by 'display_name', 'primary_email', and 'last_active_at', with backend and frontend support.
crud.tsx, updatedorder_byto include 'display_name', 'primary_email', and 'last_active_at'.user-table.tsx, enabled sorting for 'displayName', 'primaryEmail', and 'lastActiveAt' columns.orderMapinUserTableto map new sorting options to backend fields.This description was created by
for35ac05f. You cancustomize this summary. It will automatically update as commits are pushed.