Skip to content

Run R Interactive and the R language server in VS Code for the Web - #2006

Open
renkun-ken wants to merge 12 commits into
codex/webr-interactivefrom
codex/webr-browser-extension
Open

renkun-ken wants to merge 12 commits into
codex/webr-interactivefrom
codex/webr-browser-extension

Conversation

@renkun-ken

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

Copy link
Copy Markdown
Member

Summary

Activate vscode-R in the VS Code Web Worker extension host. Opening R and R Markdown documents starts the webR language service when enabled. The browser frontend also supplies a stateful R Interactive notebook with Run Selection, Run Source, chunk execution, console output, input, plots, and channel-aware interruption. File import and export use the workspace filesystem provider and preserve relative paths. Saving an .rnb retains its transcript; a tab reload starts a fresh R worker.

Desktop and remote Node hosts still use their native extension entry point. The browser restricts commands that need native processes. Separate language and evaluation workers keep editor assistance available during a computation.

Verification

  • Exercised the production browser modules in public vscode.dev in Chrome, using a temporary development-extension location to serve the build. R evaluation and language analysis ran in browser workers.
  • Verified cross-document Go to Definition, completion, hover, signature help, an Outline update after an unsaved edit, and virtual-workspace URIs.
  • Imported R source and a CSV, ran source, a selection and an R Markdown chunk against retained state, displayed a PNG in a notebook, and exported a computed file. An interrupt preserved variables while the independent language worker remained responsive.
  • Added a headless browser integration suite runnable with pnpm run test:web.

Stacked on #2005, above #2004. Tracks #2003 and relates to languageserver #905 and discussion #1903.

Package installation

The headless browser acceptance suite now installs ggplot2 using install.packages("ggplot2"), loads it, and checks the PNG notebook output. The same workflow passed in a fresh Interactive notebook on public vscode.dev.

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

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