Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
gitstart-opensource wants to merge1 commit intostack-auth:dev
base:dev
Choose a base branch
Loading
fromgitstart-oss:STA-1

Conversation

@gitstart-opensource
Copy link

@gitstart-opensourcegitstart-opensource commentedMay 31, 2025
edited by ellipsis-devbot
Loading


Important

Adds sorting options for Users list by 'display_name', 'primary_email', and 'last_active_at', with backend and frontend support.

  • Backend:
    • Incrud.tsx, updatedorder_by to include 'display_name', 'primary_email', and 'last_active_at'.
    • Implemented custom sorting logic for 'primary_email' and 'last_active_at' fields.
  • Frontend:
    • Inuser-table.tsx, enabled sorting for 'displayName', 'primaryEmail', and 'lastActiveAt' columns.
    • UpdatedorderMap inUserTable to map new sorting options to backend fields.

This description was created byEllipsis for35ac05f. You cancustomize this summary. It will automatically update as commits are pushed.

greptile-apps[bot] reacted with thumbs up emojiellipsis-dev[bot] reacted with rocket emoji
@vercel
Copy link

vercelbot commentedMay 31, 2025

@gitstart is attempting to deploy a commit to theStack Team onVercel.

A member of the Team first needs toauthorize it.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign ourContributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let usrecheck it.

@recurseml
Copy link

✨ No issues found! Your code is sparkling clean! ✨

🗒️ View all ignored comments in this repo
  • The constraint 'TokenStoreType extends string' is too restrictive. It should likely be 'TokenStoreType extends string | object' to match the condition check in line 113 where TokenStoreType is checked against {}
  • Return type mismatch - the interface declares useUsers() returning ServerUser[] but the Team interface that this extends declares useUsers() returning TeamUser[]
  • There is a syntax error in the super constructor call due to the ellipsis operator used incorrectly. Objects aren't being merged correctly. This syntax usage can lead to runtime errors when trying to pass the merged object to 'super()'. Verify that the intended alterations to the object occur before or outside of the super() call if needed.
  • Throwing an error when no active span is found is too aggressive. The log function should gracefully fallback to console.log or another logging mechanism when there's no active span, since not all execution contexts will have an active span. This makes the code less resilient and could break functionality in non-traced environments.

📚Relevant Docs

  • Function sets backendContext with a new configuration but doesn't pass 'defaultProjectKeys'. Since defaultProjectKeys is required in the type definition and cannot be updated (throws error if tried to set), this will cause a type error.
  • The schema is using array syntax for pick() which is incorrect for Yup schemas. The pick() method in Yup expects individual arguments, not an array. Should be changed to: emailConfigSchema.pick('type', 'host', 'port', 'username', 'sender_name', 'sender_email')

📚Relevant Docs

  • Creating a refresh token with current timestamp as expiration means it expires immediately. Should set a future date for token expiration.
  • The 'tools' object is initialized as an empty object, even though 'tools' is presumably expected to contain tool definitions. This could cause the server capabilities to lack necessary tool configurations, thus potentially impacting functionalities that depend on certain tool setups.

📚Relevant Docs

  • 'STACK_SECRET_SERVER_KEY' is potentially being included in every request header without checking its existence again here. Although it's checked during initialization, this could lead to security issues as it's exposed in all communications where the header is logged or captured.

📚Relevant Docs

  • When adding 'use client' directive at the beginning, it doesn't check if file.text already contains the 'use client' directive. This could lead to duplicate 'use client' directives if the file already has one.

📚Relevant Docs

Copy link
Contributor

@greptile-appsgreptile-appsbot left a 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 inapps/dashboard/src/components/data-table/user-table.tsx for Display Name, Primary Email, and Last Active columns
  • Implemented backend sorting logic inapps/backend/src/app/api/latest/users/crud.tsx with specialized handling for computed fields
  • Added order mapping incrud.tsx to translate frontend column IDs to backend field names
  • Implemented in-memory sorting forprimary_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

@gitstart-opensource
Copy link
Author

@greptileai

greptile-apps[bot] reacted with thumbs up emoji

Copy link
Contributor

@greptile-appsgreptile-appsbot left a 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 inapps/backend/src/app/api/latest/users/crud.tsx for better scalability
  • Added database indexes ondisplay_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

@gitstart-opensource
Copy link
Author

CurrentFeature
prod-stackauth-1-filtering.mp4
stackauth-1-filtering.mp4

Copy link
Contributor

@N2D4N2D4 left a 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

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ellipsis-devellipsis-dev[bot]ellipsis-dev[bot] left review comments

@N2D4N2D4N2D4 requested changes

+1 more reviewer

@greptile-appsgreptile-apps[bot]greptile-apps[bot] left review comments

Reviewers whose approvals may not affect merge requirements

Requested changes must be addressed to merge this pull request.

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@gitstart-opensource@CLAassistant@N2D4@gitstart

[8]ページ先頭

©2009-2025 Movatter.jp