Repository navigation
Description
Summary
The TUI shell connect ([s] key on sandbox detail) is completely broken. Pressing it flashes the screen briefly and returns to the TUI immediately. After a few attempts the terminal goes black.
Root Cause
Commit 61f3e7f (#175) renamed the ssh-proxy subcommand's CLI arguments as part of the cluster→gateway rebranding:
| Before #175 | After #175 | Purpose |
|---|---|---|
--gateway |
--gateway-endpoint |
Gateway URL (token mode) |
--cluster |
--gateway |
Cluster/gateway name (TLS cert resolution) |
That commit updated three of the five proxy command format strings:
- CLI
ssh_session_configinssh.rs— updated - CLI
print_ssh_configinssh.rs— updated - TUI
start_port_forwardsinlib.rs— updated - TUI
handle_shell_connectinlib.rs— missed - TUI
handle_exec_commandinlib.rs— missed
The two missed functions still build the proxy command as:
nemoclaw ssh-proxy --gateway <url> --sandbox-id <id> --token <token>
After the rename, --gateway means "cluster name" (name mode), not "URL" (token mode). Since --gateway-endpoint is missing, the ssh-proxy subcommand can't match token mode. Since --name is also missing, it can't match name mode either. It falls through to the error case and exits immediately.
SSH sees its ProxyCommand fail and exits — that's the flash. Repeated rapid TUI suspend/resume cycles (leave alternate screen → SSH fails instantly → re-enter alternate screen) corrupt the terminal state — that's the black screen.
Pre-existing gap
These two functions also never passed the cluster name for TLS cert resolution. The TUI was added in 734ec5e (Mar 2, 09:56), four hours before 189470c added --cluster to the CLI's proxy command (Mar 2, 13:52). The TUI was never backfilled. Before #175 this was a latent issue (no TLS on local clusters). After #175 it became a hard failure.
Fix
Change both handle_shell_connect and handle_exec_command to use the correct argument names matching the current main.rs definitions, and pass the cluster name:
// Before (broken)
"{exe_str} ssh-proxy --gateway {gateway_url} --sandbox-id {} --token {}"
// After (correct — matches start_port_forwards and CLI ssh_session_config)
"{exe_str} ssh-proxy --gateway-endpoint {gateway_url} --sandbox-id {} --token {} --gateway {cluster}"Affected Code
crates/navigator-tui/src/lib.rs—handle_shell_connect()(~line 712)crates/navigator-tui/src/lib.rs—handle_exec_command()(~line 854)
Reproduction
mise run term- Select a sandbox, press
Enter - Press
[s]to connect shell - Screen flashes and returns to TUI immediately
- Repeat a few times — terminal goes black
Activity
fix(tui): use correct ssh-proxy CLI args in shell connect and exec
fix(tui): use correct ssh-proxy CLI args in shell connect and exec (#193
fix(tui): use correct ssh-proxy CLI args in shell connect and exec (#193