Repository navigation
ci(docs): unpin the JupyterLite kernel and switch on the browser banner - #954
Merged
Merged
Conversation
Ported from bdsim (PR 259). jspi-check.js shows a banner before the kernel starts if the browser has no WebAssembly JSPI, and inject_jspi_check.py adds it to each page of a built JupyterLite site; both are tested. It is not run by docs.yml yet. RTB's site is still pinned to kernel 0.6.1 (Pyodide 0.27.6), which works without JSPI, so the banner would wrongly warn Safari 26 and Firefox before 153 today. The CI step that enables it belongs in the change that unpins the kernel (Issue 941). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jupyterlite-pyodide-kernel was pinned to 0.6.1 (Pyodide 0.27.6) because Safari had no WebAssembly JSPI. Safari 27 ships JSPI, and the old Pyodide then hangs there (found in bdsim, Issue 941). It is now a floor, >=0.8.7, which bundles Pyodide 314.0.6 (Python 3.14). RTB installs a pure py3-none-any wheel, so there is no wasm ABI to match. A browser without JSPI gets the banner added in the previous commit, run by a new docs.yml step after the site build. The Node install check moves to pyodide 314.0.6 with its lockfile; with the current pure wheel it passes (import, fkine, analytic IK, inline animation). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 19 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
With JupyterLite 0.8 (kernel 0.8.7), lab/index.html?path=...&reset shows the Launcher and never opens the notebook, so the check timed out waiting for it. Without '&reset' the notebook opens in about 2 seconds. A fresh browser context has no saved workspace to reset, so nothing is lost. The whole check now passes locally on Pyodide 314.0.6 in Chromium. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
It was informational until it had run green on main, and it has: on main with kernel 0.6.1, and on this branch with 0.8.7. While informational, its failure on the first run of this branch showed as a green job and was only found by reading the log. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
petercorke
marked this pull request as ready for review
November 18, 2026 04:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Unpins the JupyterLite kernel, and tells browsers that cannot run it so. Part of Issue #941; the dependency clean-up in that Issue is a separate PR.
docs.ymlinstalledjupyterlite-pyodide-kernel==0.6.1(Pyodide 0.27.6) because Safari had no WebAssembly JSPI. Safari 27 ships JSPI, and the old Pyodide then hangs there (found in bdsim, docs: let JupyterLite use the current Pyodide kernel, and warn when the browser has no JSPI bdsim#259). It is now a floor,>=0.8.7, which bundles Pyodide 314.0.6 (Python 3.14). There is no wasm ABI to match, because the site installs a purepy3-none-anywheel.A browser without JSPI (Safari before 27, Firefox before 153) gets a banner naming the browsers that work, before the kernel starts.
docs/lite/jspi-check.jsandinject_jspi_check.pyare ported from bdsim, withtests/test_lite_jspi_check.py, and a newdocs.ymlstep runs the injector after the site is built.docs/lite/wasm_check(the Node install check) moves topyodide314.0.6 with its lockfile, so it stays equal to the kernel's Pyodide. Its README, thebrowser_checkusage lines and the stale comments indocs.ymlare updated.The real-browser check (
docs/lite/browser_check) now blocks the deploy: itscontinue-on-erroris removed. It was informational until it had run green onmain, and it has. Its failure on this branch's first CI run showed as a green job, and was only found by reading the log. The check itself needed one fix for JupyterLite 0.8:?path=browser_check.ipynb&resetno longer opens the notebook, so&resetis dropped.Behaviour
No library code changes. For readers of the hosted notebooks: browsers that have JSPI (Chrome, Edge, Firefox 153 or later, Safari 27 or later) keep working, on a newer Python (3.14). Safari 26 and earlier and Firefox before 153 worked with the old pinned kernel and now see the banner instead, because the new kernel cannot run there.
What I ran, and what I could not
docs/lite/wasm_checkagainst Pyodide 314.0.6 with the current pure wheel: PASS (import roboticstoolbox,fkine, analytic IK for Puma560 in 3.5 s and Jaco in 11 s, an inline trajectory plot).tests/test_lite_jspi_check.py: 3 passed.docs.ymlparses, and the banner step comes right after the site build.docs/lite/browser_check), which iscontinue-on-errorand so can fail while the job still shows green: on the first CI run it failed, because with JupyterLite 0.8 the URL?path=browser_check.ipynb&resetshows the Launcher and never opens the notebook. Without&resetit opens in about 2 seconds (tried four URL forms locally). The last commit drops&reset. With it, the whole check passes locally on kernel 0.8.7 in Chromium: the wheel installs in the browser, the slider and the interactive figure draw, and the animation shows 8 different images.docs.ymlenvironment; the CIdocs-buildjob here is the test. A draft until it is green. The banner itself was tested by bdsim on Safari 26.python-flintmay now be usable on Pyodide 314; a comment in the install check still says it is not usable on 0.27. Not changed here.AI assistance
Written with Claude Code (Claude Sonnet 5.5), reviewed by the maintainer.
🤖 Generated with Claude Code