Restart R without reloading the page - #52
Merged
Merged
Conversation
PeterSlijkhuis
force-pushed
the
restart-r
branch
from
September 30, 2026 15:54
4329238 to
a834c3a
Compare
Restart R now closes the webR worker, which stops R even in the middle of an endless loop, and boots a fresh one in the same page. The per-instance caches (session setup, installed packages, restored uploads) reset, and the page content remounts so lessons and the R Workspace pick up the new R. Drafts and scripts are kept.
PeterSlijkhuis
force-pushed
the
restart-r
branch
from
September 30, 2026 15:55
a834c3a to
c7ee70f
Compare
This branch was successfully deployed
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.
Before: "Restart R" (and "Try again" after a failed start) reloaded the whole page.
After: it stops R, even in the middle of an endless loop, and starts a fresh R in the same page. Lessons and the R Workspace pick up the new R, and drafts and scripts are kept.
How:
restartR()closes the webR worker and tells listeners; the session setup, package and upload caches reset, and App remounts the page content and boots again. Checked with real R in a local browser:while (TRUE) {}in a lesson block and in the Workspace, then Restart R, then new code runs on a fresh R with no page reload.Generated by Claude Code