🤖 fix: use web terminal for SSH workspaces in Electron mode #951
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes regression introduced in commit 3ee7288 (ORPC migration) where SSH workspaces in Electron desktop mode would open a native terminal (Ghostty, Terminal.app) that fails, instead of the working web terminal.
The Problem
The
useOpenTerminalhook introduced in the ORPC migration always calledterminal.openNative()in Electron mode, regardless of whether the workspace was local or SSH. This caused SSH workspaces to try opening a local Ghostty/Terminal.app instead of the web-based xterm.js terminal that actually works via the PTY service.The Fix
Modified
useOpenTerminalhook to check runtime type:terminal.openWindow) - the PTY service handles SSH connectionsopenNative)Updated all call sites to pass
runtimeConfig:WorkspaceHeader.tsxAIView.tsxsources.ts(command palette actions)Generated with
mux