fix(workbench): make JupyterLab launch/exec resilient to SPA timing#494
Conversation
test_launch_jupyter and test_jupyterlab_extensions skipped with a false "IDE may not be installed" because they gated on .jp-Launcher, which only exists while the Launcher tab is open -- some deployments open JupyterLab without it. - Gate readiness on the JupyterLab app shell (.jp-LabShell), present on every load regardless of active view. - In the code-exec step: wait out the #jupyterlab-splash overlay (it lingers after the shell mounts and intercepts clicks), open a Launcher via the launcher:create command when none is auto-opened, target the visible notebook panel, and poll-dismiss the modal "Select Kernel" dialog before typing. Validated live against a Workbench 2026.06 deployment: both JupyterLab tests pass end-to-end (were skipping). Fixes #478
There was a problem hiding this comment.
Pull request overview
This PR fixes false skips in the Workbench JupyterLab UI tests by switching the “IDE is ready” gate from the transient Launcher tab to the always-present JupyterLab app shell, and hardens notebook code execution against SPA boot timing (splash overlay, missing Launcher tab, and late-appearing kernel dialog).
Changes:
- Update JupyterLab readiness gating to wait for
.jp-LabShellinstead of.jp-Launcher(fixes false “IDE may not be installed” skips). - Make the JupyterLab notebook exec flow resilient: wait for splash to clear, open a Launcher via
launcher:createwhen needed, target the visible notebook panel, and best-effort dismiss modal dialogs. - Add a Showboat demo doc capturing live validation details for issue #478.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
validation_docs/demo-478-jupyterlab-launch.md |
Adds demo/validation notes and commands documenting the fix and lint status. |
src/vip_tests/workbench/test_ide_launch.py |
Switches JupyterLab readiness gate to SHELL and hardens the code-execution path (splash, launcher creation, modal handling, visible notebook targeting). |
src/vip_tests/workbench/test_ide_extensions.py |
Switches JupyterLab readiness gate to SHELL for extension checks. |
src/vip_tests/workbench/pages/jupyterlab_session.py |
Introduces new selectors for .jp-LabShell, splash, modal dialog accept, and launcher:create. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
📸 Preview Screenshots7 screenshots captured across the website and report previews for this PR. 🌐 Website Preview —
|
PR #494's showboat demo (demo-478-jupyterlab-launch.md) landed on main after this branch removed the validation_docs archive; drop it to keep the branch's removal of the showboat convention complete.







Summary
Fixes #478 — the JupyterLab launch/extension tests skipped with a false "IDE
may not be installed" on deployments that open JupyterLab without an
auto-opened Launcher tab.
Root cause (found by live diagnosis on dev.demo)
The tests gated on
.jp-Launcher, which only exists while the Launcher tab isopen; when JupyterLab opens without it, they read as "not installed." The
code-exec path had three further blockers: the
#jupyterlab-splashoverlaylingers after the shell mounts and intercepts clicks, no Launcher auto-opens,
and a racy modal "Select Kernel" dialog appears just after the notebook opens.
Fix
.jp-LabShell), present on everyload regardless of active view.
#jupyterlab-splash, open a Launcher vialauncher:createwhen none is auto-opened, target the visible notebook panel, and
poll-dismiss the "Select Kernel" modal before typing.
Live validation (dev.demo.posit.team)
Both JupyterLab tests now pass end-to-end (were skipping):
test_jupyterlab_extensionsPASSEDtest_launch_jupyterPASSED (launcher → notebook → accept kernel → run 1+1 → assert 2)Not in this PR
#477 (Positron) is deferred with a definitive finding: dev.current's
Positron has no interpreters (the "Start New Console Session" picker is
empty), so no console renders and the test can't be validated there. The
Positron console tab/panel selectors have also drifted (this also affects
exec.py's Positron readback). Needs a Positron deployment with interpreters —tracked in #477.
Test plan
Demo
Fix #478: JupyterLab launch/exec resilient to SPA timing
2026-07-17T17:21:08Z by Showboat 0.6.1
test_launch_jupyter and test_jupyterlab_extensions skipped with a false 'IDE may not be installed' because they gated on .jp-Launcher, which only exists while the Launcher tab is open -- some deployments open JupyterLab with no Launcher tab. Root causes found by live diagnosis on dev.demo: (1) gate on the wrong element; (2) the #jupyterlab-splash overlay lingers after the shell mounts and intercepts clicks; (3) no Launcher auto-opens; (4) a modal 'Select Kernel' dialog appears a moment after the notebook opens.
Fix: gate readiness on the JupyterLab app shell (.jp-LabShell), present on every load; then in code-exec, wait out the splash, open a Launcher via launcher:create, target the visible notebook, and poll-dismiss the kernel dialog.
grep -n "SHELL = \|SPLASH = \|LAUNCHER_CREATE_COMMAND = \|DIALOG = " src/vip_tests/workbench/pages/jupyterlab_session.pyThe readiness gate now uses the app shell, not the Launcher tab:
grep -n "JupyterLabSession.SHELL" src/vip_tests/workbench/test_ide_launch.py src/vip_tests/workbench/test_ide_extensions.pyLint clean:
env -u UV_PROJECT uv run --frozen --no-sync --project . ruff check src/vip_tests/workbench/test_ide_launch.py src/vip_tests/workbench/test_ide_extensions.py src/vip_tests/workbench/pages/jupyterlab_session.pyLive validation on dev.demo.posit.team (not re-runnable here -- needs a live deployment + browser auth): with JupyterLab installed but no auto-opened Launcher, both JupyterLab tests now PASS end-to-end -- test_jupyterlab_extensions PASSED (was skipping with false 'not installed') and test_launch_jupyter PASSED (opens a Launcher, creates a notebook, dismisses the Select-Kernel dialog, runs 1+1, asserts 2). Before this change both skipped claiming JupyterLab may not be installed.