fix: v2.5.6 — Windows panes without sh, UI build without node on PATH

- Windows panes: a WinGet tmux runs native programs and there is no `sh`, so
  every pane's `sh -c` wrapper died at once ("Command failed: tmux set-option
  … mouse on"). paneArgv runs the CLI itself on win32, and a Terminal gets
  tmux's own default shell (newSession drops the `--` for an empty argv).
- Plugin UI build: client deps install with --ignore-scripts and tsc/vite run
  by the running node instead of `npm run build`. On Windows esbuild's
  postinstall went through cmd.exe with no `node` on the server's PATH, both
  installs failed, and Update now kept the previous UI. A test keeps the two
  build steps equal to client/package.json's build script.
- Update all: Atomics.wait instead of a `sleep` binary Windows lacks.
This commit is contained in:
2026-10-06 23:17:42 +07:00
parent 5fe5d51b1b
commit fcf8d8010a
13 changed files with 112 additions and 39 deletions
+6 -2
View File
@@ -76,7 +76,9 @@ function envFlags(env) {
* guessing from cwd — see resolveLaneArg in bin/agenthub.js.
*/
function newSession({ name, cwd, argv, env }) {
execImpl(["new-session", "-d", "-s", name, "-c", cwd, ...envFlags(env), "--", ...argv]);
// No argv = tmux's own default shell (a Windows Terminal pane).
const cmd = argv.length ? ["--", ...argv] : [];
execImpl(["new-session", "-d", "-s", name, "-c", cwd, ...envFlags(env), ...cmd]);
try {
enableMouse(name);
} catch (err) {
@@ -85,7 +87,9 @@ function newSession({ name, cwd, argv, env }) {
// "Command failed: tmux set-option …" that hid the real problem.
if (hasSession(name)) throw err;
throw Object.assign(
new Error(`the session's command exited as soon as it started: ${argv[0]}`),
new Error(
`the session's command exited as soon as it started: ${argv[0] || "the default shell"}`
),
{ code: "EPANEEXITED" }
);
}