mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user