fix: use MIN instead of MAX for chatTitle aggregation (GSSOC 26)#290
Conversation
|
@rudra3007-pro is attempting to deploy a commit to the Karan Mani Tripathi 's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Technical Review
Hi @rudra3007-pro! Thank you for your contribution to DoubtDesk.
The code changes look good. Before we can complete the technical review, approve, and merge this pull request, we have one final requirement for all contributors: Please star the DoubtDesk repository.
Once you have starred the repository, please drop a comment here saying "done" (or we will automatically detect it) and we will proceed with approving and merging your PR. Thank you.
There was a problem hiding this comment.
Hello there! 🎉 Thank you so much for your first pull request to DoubtDesk!
We really appreciate your contribution. A maintainer will review your code soon. If you are participating in GSSoC, ensure your PR is linked to an open issue. Please make sure you have followed all rules in our Contributing Guidelines. Happy coding!
|
done
|
knoxiboy
left a comment
There was a problem hiding this comment.
Automated review: Thank you for starring the repository! The PR is approved.
Description
Replaced
MAX(chatTitle)withMIN(chatTitle)in the chat historysession query.
MAX()on a string column returns the alphabeticallylast value instead of the original chat title, causing incorrect
titles to be displayed.
Related Issue
Closes #289
Type of Change
Screenshots (if UI change)
N/A — this is a backend query fix with no UI change.
How Has This Been Tested?
npm run devManually verified that the returned
chatTitlematches the originaltitle created for the chat session after switching to
MIN().Checklist
npm run dev)anytypes)main