Skip to content

Notify about connection lost and reconnection events - #14576

Merged
mattpap merged 8 commits into
branch-3.8from
mattpap/14564_websocket_disconnect_notify
Aug 8, 2025
Merged

Notify about connection lost and reconnection events#14576
mattpap merged 8 commits into
branch-3.8from
mattpap/14564_websocket_disconnect_notify

Conversation

@mattpap

@mattpap mattpap commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

I improved ConnectionLost event to contain all the necessary information and added reconnect() method, which can be used to manually reconnect broken connection. I intend to add a very basic notification scheme in this PR to allow UI feedback for ConenctionLost and ClientReconnected events.

fixes #14564
addresses #14252

@mattpap mattpap added this to the 3.8 milestone Jul 28, 2025
@mattpap

mattpap commented Jul 29, 2025

Copy link
Copy Markdown
Contributor Author

I added very rudimentary support for connection notifications, e.g.:

image

I still need to do some tweaking, but I think this should tentatively ready for review.

@mattpap

mattpap commented Jul 29, 2025

Copy link
Copy Markdown
Contributor Author

@philippjfr, if you want to use panel's notifications instead of this built-in approach, then I will need to add somewhere an option to allow disable notifications.

Comment thread bokehjs/src/lib/document/document.ts Outdated
@mattpap
mattpap force-pushed the mattpap/14564_websocket_disconnect_notify branch from e1729bb to 8f108c1 Compare August 5, 2025 09:38
@mattpap
mattpap requested review from hoxbro and philippjfr August 5, 2025 09:38
@mattpap
mattpap force-pushed the mattpap/14564_websocket_disconnect_notify branch from 8f108c1 to c0e4989 Compare August 7, 2025 14:42

@philippjfr philippjfr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just to record what we just discussed. It would be good to have a mechanism to disable this. A BokehJS setting is fine for now but would be nice to expose it from Python eventually.

@mattpap
mattpap force-pushed the mattpap/14564_websocket_disconnect_notify branch from 9918872 to 6873ec4 Compare August 7, 2025 16:01
@mattpap

mattpap commented Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

@philippjfr, you can now use:

import {settings} from "core/settings"
settings.notifications = false

@mattpap

mattpap commented Aug 7, 2025

Copy link
Copy Markdown
Contributor Author

A BokehJS setting is fine for now but would be nice to expose it from Python eventually.

As mentioned in the meeting, I intentionally didn't expose any public APIs this late in 3.8. I will do that for 3.9.

@mattpap
mattpap force-pushed the mattpap/14564_websocket_disconnect_notify branch from f575473 to b4f9095 Compare August 8, 2025 09:56

@philippjfr philippjfr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm happy with this now. I'll have to spend some time integrating this in Panel, and if I uncover issues there I'll open an issue. Let's get this merged and then tag a dev release.

@mattpap
mattpap merged commit e9739bd into branch-3.8 Aug 8, 2025
24 checks passed
@mattpap
mattpap deleted the mattpap/14564_websocket_disconnect_notify branch August 8, 2025 17:05
@mattpap

mattpap commented Aug 8, 2025

Copy link
Copy Markdown
Contributor Author

@philippjfr, I started 3.8.0.dev4 build, it should be ready in an hour.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notify about lost connection, etc. in the UI

2 participants