Skip to content

fix: fix double ws connection for notifications #17044

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

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

BrunoQuaresma
Copy link
Collaborator

Issue:
The UI was creating two web socket connections to receive notification updates causing duplicated values.

Cause:
We were rendering the notification container twice. One for the desktop nav and another for mobile.

Fix:
Only use one notification container for the nav.

Improvements for later:
I think would be better at some point to move the networking and data logic into a provider but it would require testing and some tiny rework. Since the actual fix works well, and it is not complex or difficult, I think it is ok to stay with it until we require to load notifications in more places.

Copy link

@cdr-bot cdr-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is a hotfix and has been automatically approved.

  • ✅ Base is main or release branch
  • ✅ Has hotfix label
  • ✅ Head is from coder/coder
  • ✅ Less than 100 lines

@BrunoQuaresma BrunoQuaresma merged commit e40ea25 into main Mar 21, 2025
32 checks passed
@BrunoQuaresma BrunoQuaresma deleted the bq/fix-double-ws-connection branch March 21, 2025 17:12
@github-actions github-actions bot locked and limited conversation to collaborators Mar 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant