mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-10-03 16:01:59 +00:00
* fix(ssh): start a redialled SSH pane in the remote directory it was in A native SSH pane dialled again (restore after a daemon restart, Reconnect, a split, ⌘T on an SSH tab, waking a sleeping tab) always landed in the login directory. The client already sent the pane's remote cwd as `SpawnNativeSsh.cwd`, but the daemon dropped it on the floor. The daemon now threads it through `Pane::spawn_native_ssh` and `SshManager::run_session` into the shell-integration bootstrap, whose first line becomes `builtin cd -- '<dir>' 2>/dev/null` (fish-quoted for fish). It is never typed at the prompt, never lands in history, and a directory that is gone leaves the shell in the login directory without a word. Sessions without integration take the plain shell request as before, so jump-host menus never see it. The per-host probe cache still holds only the shell. Only absolute paths are honoured. No wire or protocol change. Callers now say what they mean: a saved host or quick connect passes no start dir instead of the local cwd of whatever tab was in front; ⌘T and a split on an SSH pane pass that pane's remote cwd; a sleeping SSH tab keeps its remote cwd in the session layout. The daemon's replay now sends the remote context before the cwd, so a window that reattaches to an SSH pane does not wipe the remote directory it was just told. Refs #1028 Claude-Session: https://claude.ai/code/session_011mDkkQhwx4RJJBHee3yVpq * fix(ssh): a local shell standing in for a restored SSH leaf starts locally pane_to_session now keeps a native SSH leaf's far directory, so the session_to_pane fallback that brings such a leaf back as a local shell (the redial failed, or its daemon pane is gone on reattach) would hand that remote path to a local spawn. Pass no cwd there for an SSH leaf. Claude-Session: https://claude.ai/code/session_011mDkkQhwx4RJJBHee3yVpq