Skip to content

Conversation

Adityashandilya555
Copy link

@Adityashandilya555 Adityashandilya555 commented Oct 4, 2025

When users click "Save" or "Save and Continue", the page reloads and closes the websocket connection. If a background task completes during this reload, the notification is lost because there's no active websocket connection to receive it.

Fixes #264

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #264 .

Description of Changes

Added websocket disconnection in the beforeunload event handler. This
ensures the server knows the client is unavailable and will queue notifications.
When the page reloads and the websocket reconnects, any queued notifications will be
delivered properly

Screenshot

Please include any relevant screenshots.

…ions openwisp#264

When users click "Save" or "Save and Continue", the page reloads and
closes the websocket connection. If a background task completes during
this reload, the notification is lost because there's no active
websocket connection to receive it.

This change explicitly disconnects the websocket on beforeunload,
ensuring the server knows the client is unavailable. When the page
reloads and the websocket reconnects, any queued notifications will
be delivered properly.

Fixes openwisp#264
@Adityashandilya555 Adityashandilya555 force-pushed the fix/notification-toast-persist-on-reload branch from e6e571d to a0990d1 Compare October 5, 2025 05:03
@Adityashandilya555
Copy link
Author

i have fixed the qa formatting issue

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.

[bug:ui] Notification toast disappears due to page reload
1 participant