-
Notifications
You must be signed in to change notification settings - Fork 75
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
feat: stop jdaviz/voila when the browser window closes #2791
feat: stop jdaviz/voila when the browser window closes #2791
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2791 +/- ##
==========================================
- Coverage 88.72% 88.71% -0.01%
==========================================
Files 110 110
Lines 16353 16557 +204
==========================================
+ Hits 14509 14689 +180
- Misses 1844 1868 +24 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on Windows 11. I launched CLI from a terminal. Able to use Imviz. When I closed the tab, the terminal got freed up, i.e., I didn't have to Control+C to get out of the server. So I think this works. Thanks!
Maybe we should consider this a bugfix and get it in 3.9.1? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this successfully on Mac, I'm ok with the monkey patching to get this working. Thanks!
1f285c8
to
920b616
Compare
rebased and added a changelog entry for 3.9.1. Should be good to merge as soon as CI runs/passes. |
…wser window closes
…oses (#2799) Co-authored-by: Maarten Breddels <maartenbreddels@gmail.com>
Description
This feature closes jdaviz (voila) when a kernel closes, which should happen when a browser page/tab is closed.
Voila itself does not have this feature, although jupyter-server has something along these lines, but only polls every 60 seconds:
https://github.com/jupyter-server/jupyter_server/blob/de6d9047fa414859856198b7b2dfe80e60edd010/jupyter_server/serverapp.py#L2547
This change makes it immediate, but requires monkey patching. This API has been stable from the start of Voila when we wrote it, so I am not too worried that is will break, and I also believe Voila is pinned.
Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.