Fix JupyterLab proxy URL and improve jupyter executable detection #375
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I must apologize for the following. I'd like to think I'm a competent programmer (I'm a former NVidia dev, now a math prof), but this is 2025 and I have shamefully vibe-coded this PR with Claude Code because I have no idea how Bonito works. Nevertheless, it seems to work for me and allows WGLMakie use in Jupyter Lab. I hope you will find it useful!
Sincerely,
S. Loisel
Summary
This PR fixes JupyterLab support which has been broken due to incorrect proxy URL generation.
Changes
Fix proxy URL:
jupyter-server-proxymounts at/proxy/on the server root, not underbase_url(e.g.,/lab/). The previous code generated URLs likehttp://127.0.0.1:8888/lab/proxy/9384when it should behttp://127.0.0.1:8888/proxy/9384.Add
find_jupyter_executable()fallback: If IJulia's configured jupyter path doesn't exist (e.g., points to a non-existent conda environment), fall back to finding jupyter in PATH.Wrap
jupyter_running_servers()in try-catch: Prevents display crashes if the jupyter command fails.Documentation: Document JupyterLab's
jupyter-server-proxyrequirement in deployment.md.Test plan