Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the chat/notification flow to use UUID-based match IDs and reduce client-side polling by relying on real-time notifications to refresh relevant cached data.
Changes:
- Updated the real-times messages route params schema to accept UUID match IDs.
- Added server-side “block” notifications and expanded block behavior to remove likes (and adjust stats).
- Removed 5s polling for matches in chat and replaced it with React Query invalidation driven by socket notifications (plus manual invalidation on block/unblock actions).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| shared/schemas/realTimesSchema.ts | Switches matchId params validation from numeric IDs to UUID schema. |
| server/src/routes/socials/blocks.ts | Emits block notifications and performs additional cleanup (likes/stats) during block. |
| client/src/contexts/SocketContext.tsx | Invalidates React Query caches based on incoming notification payloads (match/block/unlike). |
| client/src/app/app/profile/[id]/page.tsx | Invalidates matches list after block/unblock so UI updates immediately. |
| client/src/app/app/chat/page.tsx | Removes periodic polling and adds logic to clear an invalid selected match when it disappears. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
6d5f5e7 to
f318ff5
Compare
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.
closes #87
Profile
Block flow (server)
Chat
Real-time
Schema
matchIdparam: number → UUID