-
Notifications
You must be signed in to change notification settings - Fork 238
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
Comments are being duplicated #352
Comments
Debugging a little, I saw that the comments aren't saved as duplicates in the database, so I figured out that the problem occurs when you add a new comment through the UI. A comment is added optimistically to the UI state, i.e., before the request is confirmed. briefer/apps/web/src/hooks/useComments.tsx Lines 129 to 153 in d194c4c
Since Briefer is a collaborative platform, the application receives comments made by other users in real time via WebSocket. Knowing this, I was able to discover that after comments are optimistically added, they are added again via WebSocket. The solution to this problem is very simple; you just have to check if the comment received is already in the UI state. |
Currently, when you post a new comment, it being duplicated.
Example:
Screen.Recording.2025-03-18.at.10.24.40.mov
The text was updated successfully, but these errors were encountered: