Skip to content

Add VS Code tunnel editor support - #3721

Closed
huxcrux wants to merge 11 commits into
pingdotgg:mainfrom
huxcrux:feature/vscode-remote-tunnels
Closed

huxcrux wants to merge 11 commits into
pingdotgg:mainfrom
huxcrux:feature/vscode-remote-tunnels

Conversation

@huxcrux

@huxcrux huxcrux commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

Support for VSCode tunnels was added. VSCode tunnels allows a user to access a remote VSCode instance over the internet. This makes it possible to use T3Code on a remote machine and open a VSCode window like the code was local.

Why

To make remote workflows easier for VSCode users

UI Changes

Editor dropdown:
image
Settings:
image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Introduces subprocess execution and external URL opening with tightened allowlists; server config stream shape and WS wiring change, but scope is feature-flagged via settings defaults.

Overview
Adds VS Code remote tunnel support end-to-end: the server can detect an active code tunnel, expose it on the server config WebSocket stream, and the chat Open control can launch the workspace in vscode.dev or the desktop app.

Server & contracts: New vscodeTunnel / vscodeTunnelStatus on ServerConfig, settings enableVSCodeRemoteTunnels and openVSCodeRemoteTunnelsInDesktop, and a vscodeTunnelUpdated stream event. A VSCodeTunnelMonitor runs code tunnel status (with robust JSON extraction), caches results, refreshes on settings changes and on a 1-minute tick, and feeds a centralized PubSub fan-in for subscribeServerConfig (replacing per-handler merges for keybindings/providers/settings).

Desktop & web: Electron openExternal now allows only vscode://vscode-remote/tunnel+... URLs (not arbitrary vscode: links). OpenInPicker gains a tunnel menu entry and primary action when no cross-environment editor picker is shown; links use shell.openExternal. Connections settings show tunnel status and the two toggles.

Tests: Coverage for URL allowlisting, tunnel JSON parsing, monitor caching, client config projection, and server WS subscription behavior.

Reviewed by Cursor Bugbot for commit 941fe4c. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add VS Code remote tunnel editor support to the server config stream and UI

  • Adds a VSCodeTunnelMonitor service (vscodeTunnel.ts) that periodically runs code tunnel status, parses the output, and publishes updates via a PubSub stream
  • Extends the server config WebSocket stream with a new vscodeTunnelUpdated event type and includes vscodeTunnel/vscodeTunnelStatus fields in the config snapshot
  • Adds an OpenInPicker option in the chat header to open the current path via a VS Code remote tunnel (web vscode.dev URL or desktop vscode:// URL based on settings)
  • Adds two settings in ConnectionsSettings: toggle tunnel monitoring (enableVSCodeRemoteTunnels) and choose desktop vs. browser target (openVSCodeRemoteTunnelsInDesktop)
  • Extends parseSafeExternalUrl in ElectronShell.ts to allow vscode://vscode-remote/tunnel+* URLs through the external link safety check

Macroscope summarized 941fe4c.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1c038ec9-8f17-425e-a353-1e2f9ceaf90c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 5, 2026
Comment thread apps/server/src/vscodeTunnel.ts Resolved
Comment thread apps/server/src/ws.ts Resolved
Comment thread apps/server/src/ws.ts Resolved
@macroscopeapp

macroscopeapp Bot commented Jul 5, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

2 blocking correctness issues found. This PR introduces a new VS Code tunnel feature with new settings, UI components, and background monitoring across multiple packages. The scope of new capability warrants human review, and there are two unresolved review comments identifying potential bugs in the JSON parsing and race condition handling.

You can customize Macroscope's approvability policy. Learn more.

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effect service convention: consume the local ProcessRunner service module through its namespace rather than importing the service tag directly.

Posted via Macroscope — Effect Service Conventions

Comment thread apps/server/src/vscodeTunnel.ts Resolved
Comment thread apps/server/src/vscodeTunnel.ts Resolved
Comment thread apps/server/src/vscodeTunnel.ts Resolved
Comment thread apps/server/src/vscodeTunnel.ts Resolved
@huxcrux
huxcrux force-pushed the feature/vscode-remote-tunnels branch from b2f1cdb to 2236c9d Compare July 5, 2026 21:55
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Jul 5, 2026
Comment thread apps/server/src/vscodeTunnel.ts Resolved
Comment thread apps/server/src/vscodeTunnel.ts Resolved
Comment thread apps/server/src/ws.ts Resolved
Comment thread apps/server/src/ws.ts Resolved
Comment thread apps/server/src/vscodeTunnel.ts Resolved
Comment thread apps/server/src/vscodeTunnel.ts Resolved
@huxcrux
huxcrux force-pushed the feature/vscode-remote-tunnels branch from 146c285 to 3eb9989 Compare July 15, 2026 13:37
Comment thread apps/server/src/vscodeTunnel.ts Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3eb9989. Configure here.

Comment thread apps/server/src/ws.ts Resolved
Comment thread apps/server/src/ws.ts Resolved
Comment thread apps/web/src/components/ChatView.tsx Resolved
@juliusmarminge

Copy link
Copy Markdown
Member
CleanShot 2026-07-16 at 09 56 39@2x

this UX doesn't make sense does it? why show both normal vscode as well as vscode remote? normal vscode and finder wont work for remote envs? shouldn't it be mutually exclusive??

@huxcrux

huxcrux commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author
CleanShot 2026-07-16 at 09 56 39@2x this UX doesn't make sense does it? why show both normal vscode as well as vscode remote? normal vscode and finder wont work for remote envs? shouldn't it be mutually exclusive??

I definitely agree. I'll look into this later today.

@juliusmarminge

juliusmarminge commented Jul 16, 2026 •

Copy link
Copy Markdown
Member

would be good to have the architecture support adding zed remote and jetbrains as well in a follow up so make sure it's not too tied to only vscode

@huxcrux

huxcrux commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Closeing this PR and will open another one with SSH support once I can get my local dev environment to behave with remote sessions

@huxcrux huxcrux closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants