-
Notifications
You must be signed in to change notification settings - Fork 231
[comp] Production Deploy #1996
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
[comp] Production Deploy #1996
Conversation
* feat(vendors): enhance vendor creation with name trimming and duplicate check * refactor(vendors): update vendor name selection logic for consistency * fix(vendors): trim whitespace from vendor name input --------- Co-authored-by: Tofik Hasanov <annexcies@gmail.com>
PR SummaryImproves vendor creation UX and data integrity, and enriches GitHub integration checks with actionable evidence.
Written by Cursor Bugbot for commit 4d554a4. This will update automatically on new commits. Configure here. |
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
…detection (#1995) Co-authored-by: Tofik Hasanov <annexcies@gmail.com>
| setSearchResults([]); | ||
| setIsSearching(false); | ||
| setPopoverOpen(false); | ||
| }, [isSheetOpen]); |
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.
Stale search results persist after sheet reopens
Low Severity
When a user closes the sheet while a vendor search is in flight, the cleanup effect at lines 77-80 clears searchResults. However, if the API response arrives after this cleanup, the onSuccess callback repopulates searchResults with stale data. When the sheet reopens, the effect does an early return (line 72), so stale results are not cleared. If the user then types 2+ characters, the onChange handler only calls setSearchResults([]) for inputs with length ≤ 1, so stale results briefly appear in the dropdown until the new debounced search completes.
Additional Locations (1)
…ng (#1997) Co-authored-by: Tofik Hasanov <annexcies@gmail.com>
| return { | ||
| success: false, | ||
| error: `A vendor named "${existingVendor.name}" already exists in this organization.`, | ||
| }; |
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.
Race condition allows duplicate vendor names
Medium Severity
The duplicate vendor name check and vendor creation are separate database operations without transaction protection. Two concurrent requests can both pass the findFirst check before either creates the vendor, resulting in duplicate vendors with the same name in the organization. The Vendor model lacks a @@unique([organizationId, name]) constraint that would provide database-level protection against this race condition.
|
🎉 This PR is included in version 1.76.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.