You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split out of #205, whose acceptance criteria allow this part to be "either implemented as decided, or split into its own issue before this one closes". #205 ships the opt-in configuration change; this issue carries the deferred failsafe.
Launch now renders only when launch_notebook_repo names a notebook repository andlaunch_colab is true, and nothing is derived from project.github. That removes every dead link we can currently point at:
lecture-wasm and the four unconfigured translations (lecture-python-programming.fa, .fr, .zh-cn, .ml) have no notebooks repository, so they now show no Launch at all rather than linking to a guessed <source>.notebooks that 404s.
A narrower case: a site whose notebooks repository does exist, but where an individual page's notebook is missing from it — or where the repository is renamed or emptied after the build. The maintainer wants a failsafe so Launch never opens a missing notebook.
Three approaches were weighed on #205; the current thinking is the first.
Approach
How it works
For
Against
In-page failsafe (current thinking)
Launch starts hidden. A script requests the page's notebook (e.g. HEAD https://raw.githubusercontent.com/<repo>/<branch>/<path>.ipynb) and reveals the control only on success. raw.githubusercontent.com allows cross-origin requests and 404s for a missing repository (checked 2026-09-11)
Accurate per page; catches a repository renamed or emptied after the build; no build change
One request to GitHub per page view (cacheable for the session); the control appears after load; readers without JavaScript, or where GitHub is blocked, never see it
Build-time check
The theme fetches the notebook repository's file list once per build and renders Launch only on pages whose notebook is listed
Static, repeatable output; no requests from readers
Needs network during the build and a GITHUB_TOKEN in CI (the unauthenticated GitHub API allows 60 requests an hour); goes stale if the repository changes after the build
Split out of #205, whose acceptance criteria allow this part to be "either implemented as decided, or split into its own issue before this one closes". #205 ships the opt-in configuration change; this issue carries the deferred failsafe.
What #205 already fixes
Launch now renders only when
launch_notebook_reponames a notebook repository andlaunch_colabis true, and nothing is derived fromproject.github. That removes every dead link we can currently point at:<source>.notebooksthat 404s.launch_notebook_repo.What is left
A narrower case: a site whose notebooks repository does exist, but where an individual page's notebook is missing from it — or where the repository is renamed or emptied after the build. The maintainer wants a failsafe so Launch never opens a missing notebook.
Three approaches were weighed on #205; the current thinking is the first.
HEAD https://raw.githubusercontent.com/<repo>/<branch>/<path>.ipynb) and reveals the control only on success.raw.githubusercontent.comallows cross-origin requests and 404s for a missing repository (checked 2026-09-11)GITHUB_TOKENin CI (the unauthenticated GitHub API allows 60 requests an hour); goes stale if the repository changes after the buildWhichever is chosen:
qe-launch-slotclass andempty:hidden, so a hidden control already collapses rather than leaving a gap.Acceptance criteria
Context