Implement obscenity filter for lobby names and user names - #38
Draft
mterczynski with Copilot wants to merge 4 commits into
Draft
mterczynski with Copilot wants to merge 4 commits into
mterczynski with Copilot wants to merge 4 commits into
Conversation
Co-authored-by: mterczynski <27309340+mterczynski@users.noreply.github.com>
- Add obscenity package dependency to server and client - Create obscenity filter utilities for both server and client - Add lobby name field to lobby types and data structures - Update lobby creation API to require and validate lobby names - Update user registration to validate for profanity - Add comprehensive tests for obscenity filtering - Update client forms to include lobby name input with validation - Update lobby list to display lobby names instead of creator names Co-authored-by: mterczynski <27309340+mterczynski@users.noreply.github.com>
- Fix chess-shared module import issues by using local type definitions - Enhance lobby list UI to show both lobby name and creator name - Improve lobby list visual hierarchy with better styling - All tests passing with comprehensive obscenity filtering coverage Co-authored-by: mterczynski <27309340+mterczynski@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] @mterczynski/chess/issues/29
Implement obscenity filter for lobby names and user names
Aug 28, 2025
mterczynski
reviewed
Aug 28, 2025
mterczynski
reviewed
Aug 28, 2025
| return; | ||
| } | ||
|
|
||
| if (name.length > 50) { |
Owner
There was a problem hiding this comment.
Should me moved to /shared for consistency between client and server
mterczynski
reviewed
Aug 28, 2025
| spellCheck={false} | ||
| autoCorrect="off" | ||
| autoCapitalize="off" | ||
| maxLength={50} |
Owner
There was a problem hiding this comment.
As above, should be moved to /shared
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.
Fixes #29 by implementing comprehensive obscenity filtering for both lobby names and user names using the
obscenitylibrary with English dataset validation.Changes Made
Server-side Implementation
server/src/utils/obscenity-filter.ts) with proper API configuration usingRegExpMatcherand English datasetClient-side Implementation
Type System Updates
CreateLobbyDtoandLobbySummaryDtoLobbyinterface and related data structuresTechnical Details
The implementation uses the
obscenitylibrary'sRegExpMatcherwith:Validation Examples
Testing
All tests pass including:
The implementation provides robust protection against inappropriate content while maintaining a smooth user experience with clear error messaging.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.