Make room name unique for user#52
Open
aissshah wants to merge 7 commits intoTandemCreativeDev:mainfrom
Open
Conversation
- Add /api/rooms/check-name endpoint for real-time name availability checking - Update room creation API to validate duplicate titles per user - Return 409 status code with user-friendly error message for duplicates Refs TandemCreativeDev#11. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Create roomNameValidation helper for API calls - Add debounced validation to RoomCreationForm component - Show real-time feedback with visual indicators (green/red borders) - Disable submit button when name is unavailable or validating - Display validation messages for better user experience Refs TandemCreativeDev#11. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update roomApi to parse and return specific error messages from API - Enhance dashboard error handling to show user-friendly messages - Replace generic "Failed to create room" with specific error details - Better user experience when duplicate room names are detected Refs TandemCreativeDev#11. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove duplicate validation check from API since frontend handles it - Remove popup alert from dashboard since inline validation shows errors - Cleaner user experience with single error display method Refs TandemCreativeDev#11. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add @@unique([title, userId]) constraint to Chatroom model to enforce room name uniqueness per user at the database level. This provides a safety net alongside frontend validation. Refs TandemCreativeDev#11. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove unused error variables to fix ESLint warnings. Refs TandemCreativeDev#11. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Author
|
Update: Changes have been pushed. Steps: (Documentation) The drift error message: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses the bug raised where a user can create rooms with the same title. Room names are not unique between users.
Note, the room name is case insensitive.
Closes #11
Type of change
Screenshots
Changes Made
Backend
Frontend
Technical Implementation
Test Plan
Checklist:
- [ ] I have made corresponding changes to the documentation (no documentation changes required)