Skip to content
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

fix: don't call window reload every time we receive an alert #251

Merged

Conversation

alex-mcgovern
Copy link
Collaborator

@alex-mcgovern alex-mcgovern commented Feb 5, 2025

  • A partial fix for The dashboard refreshes many times for a single conversation #250
  • Removes the window.reload call when we receive a server-sent event for an alert being created
  • Removes the window.Notification code — this didn't seem to be doing much anyway
  • Makes the invalidation of cached data more granular when we receive an alert — now we only invalidate alerts & messages
  • There is still further optimisation to be done, we are repeatedly requesting alerts in a loop, this just fixes the visual impact to the user, which is most important

Before

Screen.Recording.2025-02-05.at.8.28.39.AM.mov

After

Screen.Recording.2025-02-05.at.8.28.01.AM.mov

peppescg
peppescg previously approved these changes Feb 5, 2025
Copy link

Minder Vulnerability Report ✅

Minder analyzed this PR and found it does not add any new vulnerable dependencies.

Vulnerability scan of 697509e1:

  • 🐞 vulnerable packages: 0
  • 🛠 fixes available for: 0

@alex-mcgovern alex-mcgovern merged commit a2da3ae into main Feb 5, 2025
8 checks passed
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 13154166930

Details

  • 1 of 2 (50.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 73.651%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/hooks/useSse.ts 1 2 50.0%
Totals Coverage Status
Change from base Build 13116159467: -0.5%
Covered Lines: 787
Relevant Lines: 1001

💛 - Coveralls

@alex-mcgovern alex-mcgovern deleted the fix/dont-call-window.reload-every-time-we-receive-an-alert branch February 5, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants