From 0987dadeeea0bff7d8da2f826d2788b2be602907 Mon Sep 17 00:00:00 2001 From: John Myers Date: Mon, 9 Mar 2026 18:21:11 -0700 Subject: [PATCH] fix(tui): use correct ssh-proxy CLI args in shell connect and exec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ProxyCommand in handle_shell_connect and handle_exec_command was using --gateway for the URL, but after the #175 rename --gateway means cluster name and --gateway-endpoint is the URL flag. The ssh-proxy subprocess could not match token mode (no --gateway-endpoint) or name mode (no --name), so it exited immediately — causing a screen flash and eventual terminal corruption from rapid suspend/resume cycles. Use --gateway-endpoint for the URL and --gateway for the cluster name, matching the format already used by start_port_forwards and the CLI. Fixes #188 --- crates/navigator-tui/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/navigator-tui/src/lib.rs b/crates/navigator-tui/src/lib.rs index 0bff862437..88be17edbb 100644 --- a/crates/navigator-tui/src/lib.rs +++ b/crates/navigator-tui/src/lib.rs @@ -708,11 +708,11 @@ async fn handle_shell_connect( } }; let exe_str = shell_escape(&exe.to_string_lossy()); + let cluster = shell_escape(&app.cluster_name); let proxy_command = format!( - "{exe_str} ssh-proxy --gateway {gateway_url} --sandbox-id {} --token {}", + "{exe_str} ssh-proxy --gateway-endpoint {gateway_url} --sandbox-id {} --token {} --gateway {cluster}", session.sandbox_id, session.token, ); - // Step 5: Build the SSH command. let mut command = std::process::Command::new("ssh"); command @@ -850,8 +850,9 @@ async fn handle_exec_command( } }; let exe_str = shell_escape(&exe.to_string_lossy()); + let cluster = shell_escape(&app.cluster_name); let proxy_command = format!( - "{exe_str} ssh-proxy --gateway {gateway_url} --sandbox-id {} --token {}", + "{exe_str} ssh-proxy --gateway-endpoint {gateway_url} --sandbox-id {} --token {} --gateway {cluster}", session.sandbox_id, session.token, );