Skip to content

Add a managed webR provider to R Interactive - #2005

Open
renkun-ken wants to merge 11 commits into
codex/webr-runtimefrom
codex/webr-interactive
Open

renkun-ken wants to merge 11 commits into
codex/webr-runtimefrom
codex/webr-interactive

Conversation

@renkun-ken

@renkun-ken renkun-ken commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Offer webR in the R Interactive session picker before native R or arf is required. Run selections, source, and R Markdown chunks in a stateful worker supervised by the existing desktop session agent. A project mount gives R relative access to project source and data. Console output, conditions, nested input, interruption, and static PNGs use the existing Interactive presentation. Reconnecting to a running agent preserves the R session and transcript.

The console evaluator is also shared with the browser frontend in the next PR. The language-service worker from #2004 runs independently.

Verification

  • Exercised the real desktop picker with native R and arf unavailable, launched a detached agent, ran a selection and confirmed a PNG notebook output.
  • Tested source/CSV file access, retained state on reconnect, input prompts, R errors, graphics, and interruption of busy and waiting cells.
  • Tested the shared evaluator on public vscode.dev with preserved R state after interruption and a rendered notebook output in the integrated browser frontend.

Stacked on #2004. Tracks #2003.

Package installation

A fresh webR Interactive session accepts install.packages("ggplot2") and library(ggplot2). The console selects compatible WebAssembly binaries and keeps the usual package loading semantics. Detached webR agents use a private writable host directory for the synchronous downloader while R retains its mounted project directory. Interactive notebook cells and input follow their bound webR session for language features in auto mode.

Verified with the packaged VSIX and the desktop VS Code helper launched from /. It installed ggplot2 4.0.3 and its dependencies, then rendered a scatterplot. Added regression tests for ordinary installation, a missing package, downloading an index, and bound language-service selection.

@renkun-ken
renkun-ken requested a review from eitsupi November 28, 2026 10:53

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant