fix(ssh): the forwards panel is offered for live sessions only

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.
This commit is contained in:
l0ng-ai
2026-08-24 00:23:20 +08:00
parent 8ab6f73685
commit af36731d75
+1 -4
View File
@@ -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);
}