From af36731d755028e776b7a4dbf201c25624993b6f Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Mon, 24 Aug 2026 00:23:20 +0800 Subject: [PATCH] fix(ssh): the forwards panel is offered for live sessions only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A fifth site asking the same question the wrong way, missed on the first pass because it spells the phase check inline rather than through the shape the others used. `connected_ssh` decides whether a pane gets the port-forwards panel, and it asked the phase alone. So a pane whose SSH client had already exited still offered to add forwards — over a link with nothing at the far end to carry them, on a panel whose whole subject is a connection that is gone. Now the same `ssh_session_live()` as the other four. Checked the remaining phase readers while here: the status strip and the tab dot both go through `ssh_disconnected()` and already account for it, and `ssh_prompt` only records the phase for display. --- src/ui/right_panel.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ui/right_panel.rs b/src/ui/right_panel.rs index 34480a3d..e6be72ca 100644 --- a/src/ui/right_panel.rs +++ b/src/ui/right_panel.rs @@ -706,10 +706,7 @@ impl Tty7App { let connected_ssh = view .remote_context() .is_some_and(|c| c.kind == crate::daemon::protocol::RemoteKind::NativeSsh) - && matches!( - view.ssh_phase(), - Some(crate::daemon::protocol::SshPhase::Connected) - ); + && view.ssh_session_live(); if connected_ssh || view.workspace().is_some() { forwards_pane = Some(view.pane_id); }