Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

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 useOpenTerminal hook introduced in the ORPC migration always called terminal.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 useOpenTerminal hook to check runtime type:

  • SSH workspaces: Always use web terminal (terminal.openWindow) - the PTY service handles SSH connections
  • Local workspaces in Electron: Continue using native terminal (openNative)
  • Browser mode: Unchanged (always web terminal)

Updated all call sites to pass runtimeConfig:

  • WorkspaceHeader.tsx
  • AIView.tsx
  • sources.ts (command palette actions)

Generated with mux

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 fix:
- Modified useOpenTerminal hook to check if workspace is SSH runtime
- SSH workspaces now always use web terminal (via terminal.openWindow)
- Local workspaces in Electron still use native terminal (openNative)
- Browser mode behavior unchanged (always web terminal)

Updated call sites to pass runtimeConfig:
- WorkspaceHeader.tsx
- AIView.tsx
- sources.ts (command palette actions)
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@ammario ammario merged commit ab873ab into main Dec 6, 2025
19 checks passed
@ammario ammario deleted the ssh-terminal-regression-fix branch December 6, 2025 22: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.

2 participants