Skip to content

Fix ssh remote Agents & dev:win script#313

Merged
pedramamini merged 5 commits intoRunMaestro:mainfrom
chr1syy:fix-ssh-local-override
Feb 6, 2026
Merged

Fix ssh remote Agents & dev:win script#313
pedramamini merged 5 commits intoRunMaestro:mainfrom
chr1syy:fix-ssh-local-override

Conversation

@chr1syy
Copy link
Contributor

@chr1syy chr1syy commented Feb 6, 2026

This pull request introduces improvements to SSH remote execution support and enhances the user interface for configuring agent paths, especially when SSH is enabled. The most significant changes ensure correct process handling for SSH sessions and update the UI to clearly distinguish between local and remote agent execution.

SSH Remote Execution Support:

  • When launching an agent via SSH, the process handler now disables shell execution to ensure proper stdin passthrough, which is critical for SSH script delivery. (src/main/ipc/handlers/process.ts)

UI/UX Improvements for Agent Configuration:

  • The agent configuration panel now accepts an isSshEnabled prop to adapt its behavior and appearance for SSH sessions. (src/renderer/components/shared/AgentConfigPanel.tsx, src/renderer/components/NewInstanceModal.tsx) [1] [2] [3]
  • When SSH is enabled and no custom path is set, the input field displays the remote binary name, is read-only, and is visually dimmed to indicate non-editability. The label changes from "Path" to "Remote Command," and the help text updates accordingly. (src/renderer/components/shared/AgentConfigPanel.tsx) [1] [2] [3]

Developer Experience:

  • The development startup script now waits for the renderer dev server to be ready before launching the main Electron process, and ensures the preload script is built. (scripts/start-dev.ps1)

Minor UI Consistency:

  • Refactored the conditional logic for displaying "Beta" badges on certain agents for better readability. (src/renderer/components/NewInstanceModal.tsx)

…bled

When a session uses SSH remote execution, the agent path field was showing
the local Windows path (e.g., C:\Program Files\...), which confused users
and didn't represent what would actually be used on the remote host.

Now when SSH is enabled in the agent editor:
- The path field label changes from 'Path' to 'Remote Command'
- The displayed value shows agent.binaryName (e.g., 'opencode') instead of agent.path
- The help text clarifies this is a remote command name
- Users understand they don't need to set a local path for SSH execution

The backend SSH command construction already correctly uses:
  remoteCommand = config.sessionCustomPath || agent.binaryName || config.command

This fix ensures the UI matches the backend behavior by showing users what
will actually be executed on the remote host.
CRITICAL: When using SSH remote execution, stdin script passthrough must work
directly without shell interference. Previously, the Windows shell forcing
logic (added to ensure PATH access for local execution) was still enabled
when SSH was detected. This caused the SSH stdin script to be lost because
the shell intercepts stdin/stdout/stderr.

The fix: When SSH remote is configured and the stdin script is built,
explicitly disable shell execution (useShell=false, shellToUse=undefined).
This ensures:
- Direct stdin/stdout/stderr access for SSH
- SSH stdin script passthrough works correctly
- Agent receives the full command on the remote host

This resolves the issue where SSH commands were executed as just:
  ssh.exe ... /bin/bash
Without the stdin script containing the actual agent invocation.
The start-dev.ps1 script was missing the 'npm run build:preload' step,
which caused the preload.js file to never be built when running 'npm run dev:win'.
This resulted in window.maestro being undefined and the app failing to load.

Added the build:preload step between TypeScript compilation and electron startup.
…eady

Added a 5 second delay after starting the renderer dev server before
building and launching the main process. This ensures the Vite dev server
is fully ready on http://localhost:5173 before Electron tries to connect
to it, preventing timing-related connection issues.
…l modification

When SSH is enabled and no custom path is set, the field displays the
remote binary name (e.g., 'opencode') as a read-only default. This prevents
users from accidentally modifying the displayed value and having it saved
as a custom path.

The field becomes:
- Read-only when displaying the default remote binary name
- Slightly dimmed (opacity: 0.7) to indicate it's not editable
- Editable again if the user enters a custom override
- Shows a Reset button only when a custom path is actually set

This ensures the behavior matches the intent: leave empty to use the default
remote binary name.
@chr1syy chr1syy marked this pull request as draft February 6, 2026 20:07
@chr1syy chr1syy marked this pull request as ready for review February 6, 2026 20:09
@pedramamini pedramamini merged commit 1baec4a into RunMaestro:main Feb 6, 2026
1 check failed
@chr1syy chr1syy deleted the fix-ssh-local-override branch February 16, 2026 21:28
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

Comments