Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

@ibetitsmike ibetitsmike commented Dec 10, 2025

When running mux server and accessing via browser, 'Open in Editor' now uses deep link URLs (vscode://, cursor://) instead of trying to spawn an editor process on the server machine.

Configuration

SSH hostname can be configured in order of precedence:

Method Example Best for
CLI flag mux server --ssh-host devbox Ad-hoc usage
Env var MUX_SSH_HOST=devbox mux server Containers, systemd
Config file serverSshHost in ~/.mux/config.json Persistent default
Settings UI Settings → SSH Host (browser mode only) Interactive configuration

Scenarios handled

Scenario Deep Link Format
Local server (localhost) vscode://file/path/to/file
Remote server + local workspace vscode://vscode-remote/ssh-remote+host/path
Remote server + SSH workspace Uses workspace's SSH host

UI Changes

  • Settings now shows 'SSH Host' field in browser mode - lets users configure the SSH hostname for deep links
  • Settings shows a warning when custom editor is selected in browser mode
  • Zed with SSH workspaces shows appropriate error (no Remote-SSH support)

Files changed

  • New: src/browser/utils/editorDeepLinks.ts - deep link URL generator
  • src/browser/hooks/useOpenInEditor.ts - browser mode detection and deep link handling
  • src/browser/components/Settings/sections/GeneralSection.tsx - SSH Host field
  • src/cli/server.ts - added --ssh-host flag
  • src/node/services/serverService.ts - stores SSH host
  • src/common/orpc/schemas/api.ts + router.ts - exposes server.getSshHost() and server.setSshHost()
  • src/common/types/project.ts + src/node/config.ts - config schema update

Generated with mux

When running `mux server` and accessing via browser, 'Open in Editor' now
uses deep link URLs (vscode://, cursor://) instead of trying to spawn an
editor process on the server machine.

Configuration options for SSH hostname (in order of precedence):
- CLI: `mux server --ssh-host devbox`
- Environment: `MUX_SSH_HOST=devbox mux server`
- Config file: `serverSshHost` in ~/.mux/config.json

Scenarios handled:
- Local server (localhost): Uses local file deep links
- Remote server with local workspace: Uses SSH remote deep links
- Remote server with SSH workspace: Uses workspace's SSH host

Also adds a warning in Settings when custom editor is selected in browser
mode, since custom editors can't work via deep links.

_Generated with `mux`_
Adds server.setSshHost() API endpoint and SSH Host input field in Settings
that appears only in browser mode. Users can now configure the SSH hostname
used for editor deep links directly from the Settings UI.
@ibetitsmike ibetitsmike added this pull request to the merge queue Dec 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 10, 2025
@ibetitsmike ibetitsmike added this pull request to the merge queue Dec 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 10, 2025
@ibetitsmike ibetitsmike merged commit f6fda01 into main Dec 10, 2025
20 checks passed
@ibetitsmike ibetitsmike deleted the mike/editor-deep-links branch December 10, 2025 16:05
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