-
Notifications
You must be signed in to change notification settings - Fork 428
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 our terms of service and privacy 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?
Conversation
@gitstart is attempting to deploy a commit to the Stack Team on Vercel. A member of the Team first needs to authorize it. |
|
✨ 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.tsx
for Display Name, Primary Email, and Last Active columns - Implemented backend sorting logic in
apps/backend/src/app/api/latest/users/crud.tsx
with specialized handling for computed fields - Added order mapping in
crud.tsx
to translate frontend column IDs to backend field names - Implemented in-memory sorting for
primary_email
andlast_active_at
fields 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
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.tsx
for better scalability - Added database indexes on
display_name
,primary_email
, andlast_active_at
columns 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
|
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
Important
Adds sorting options for Users list by 'display_name', 'primary_email', and 'last_active_at', with backend and frontend support.
crud.tsx
, updatedorder_by
to include 'display_name', 'primary_email', and 'last_active_at'.user-table.tsx
, enabled sorting for 'displayName', 'primaryEmail', and 'lastActiveAt' columns.orderMap
inUserTable
to map new sorting options to backend fields.This description was created by
for 35ac05f. You can customize this summary. It will automatically update as commits are pushed.