Skip to content

Open webR session files in VS Code and show the backend and filesystem - #2010

Open
renkun-ken wants to merge 10 commits into
codex/webr-share-session-packagesfrom
codex/webr-session-files
Open

renkun-ken wants to merge 10 commits into
codex/webr-share-session-packagesfrom
codex/webr-session-files

Conversation

@renkun-ken

Copy link
Copy Markdown
Member

Open session files in VS Code

Use R: Open webR Session File… from the palette or session actions. Read, edit and save files directly against the owning webR generation. file.edit("/tmp/example.R") opens the corresponding editor, and ?mean opens normalized R help as a read-only text document. A stale editor cannot overwrite a file belonging to a restarted session.

On desktop, /project is the mounted project directory on the R host; paths there open as ordinary workspace URIs. Other paths such as /home/web_user and /tmp belong to the session. In browser-only VS Code, /workspace contains explicitly imported files. Session files use the correct execution and language worker when several notebooks are open.

The Interactive Sessions tree, notebook kernel button and status bar show the canonical backend name, including webR. The notebook explains its filesystem visibly. Native session identity and existing workspace-file behavior are preserved.

Verification

  • Opened and saved session files in desktop VS Code and in Chromium's VS Code web workbench; R read back the editor changes.
  • Tested equal paths in independent sessions, read/write across chunk boundaries, retained data after reconnect and rejection of stale writes after restart.
  • Exercised file.edit(), read-only R help, the desktop host project mapping, browser import/export, and session-specific language completion.
  • Checked visible tree, kernel and status text in the workbench.

Stacked on #2009. Tracks #2003.

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