8000 fix(ssh): settle the non-blocking points of the ssh workspaces review (#468) by stlindenau · Pull Request #475 · amirlehmam/wmux · GitHub
[go: up one dir, main page]

Skip to content

fix(ssh): settle the non-blocking points of the ssh workspaces review (#468) - #475

Merged
amirlehmam merged 7 commits into
amirlehmam:masterfrom
stlindenau:followup-468-nonblocking
Nov 25, 2026
Merged

amirlehmam merged 7 commits into
amirlehmam:masterfrom
stlindenau:followup-468-nonblocking

Conversation

@stlindenau
Copy link
Copy Markdown
Contributor

Follow-up to #468, for the points the review listed as non-blocking and that were still open after 4b70e72 (the four blockers) merged.

What changes

Point Result
A fish login shell on the direct route Fixed. The direct route's command is now sh -c 'eval "$(echo <base64>|base64 -d)"' (loginShellNeutralCommand), so the account's login shell only sees base64 inside fixed single quotes, which sh, bash, zsh, fish and csh read the same way. A file name cannot be re-parsed by it. Needs base64 on the host (the worker already does).
Two targets with the same alias reaching different hosts Fixed. Same destination, port and checkout with a different connection (-F, -J, -i, options, WSL distro) is refused by resolveRemoteIdentity as ambiguous_target, never resolved to the first target.
Targets not cleared on a window close Fixed. Only a closed workspace cleared its target. A target is now also dropped when the window that set it closes, unless another window has set one since.
ControlPersist=300 outliving wmux Fixed on quit: ssh -O exit for each distinct WSL-route connection (ssh-master.ts; at most 8, 1.5 s each, errors ignored). Not fixed for a kill: the master then lives up to 300 s. A shorter persist would also end the worker's connection sooner (they are tied by SSH_CONNECTION_PERSIST_S) and cost a new login after each short pause.
Create, rename and delete have no IPC handler Not wired. The local Explorer has no such action either (no channel, no UI), so wiring them is a feature of its own with a destructive IPC surface. The functions stay as the tested remote layer; a comment and the docs say that no view calls them. Say if you would rather have them removed.
The direct route opens a new ssh login per poll Not changed (a design change: ControlMaster=no there). Documented.

docs/remote-workspace-views.md gets a table with these outcomes.

Verification

  • tsc clean on both projects, eslint clean on the changed files.
  • npm run test:posix: 21 files, 508 tests, on Linux.
  • New tests for each fix; the ones for the base64 command, the ambiguous identity and the window close fail without their change. The fake ssh and the command assertions in the existing tests now decode the base64 command.
  • Merged cleanly onto master at d1eda84.

Not verified

  • A real fish shell (the base64 command is tested against fish's reading of single quotes, not run under fish).
  • A real sshd for ssh -O exit (only the argument order was checked, against OpenSSH 8.9).
  • Windows, wsl.exe.

🤖 Generated with Claude Code

stlindenau and others added 7 commits November 24, 2026 07:37
…n re-parse a file name

Review of amirlehmam#468, non-blocking (fish login shell).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ect-route command

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…argets share

Review of amirlehmam#468, non-blocking (resolveRemoteIdentity).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review of amirlehmam#468, non-blocking (targets on window close).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Review of amirlehmam#468, non-blocking (ControlPersist).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ettled

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…delete

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@amirlehmam
amirlehmam merged commit 04677a5 into amirlehmam:master Nov 25, 2026
@stlindenau
stlindenau deleted the followup-468-nonblocking branch November 26, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0