Windows support: build fixes, agent integration, OpenRouter launches, PowerShell default, CI - #8
Open
lgorby wants to merge 2 commits into
Open
Windows support: build fixes, agent integration, OpenRouter launches, PowerShell default, CI#8lgorby wants to merge 2 commits into
lgorby wants to merge 2 commits into
Conversation
- postinstall: rewrite scripts/postinstall.sh as a cross-platform scripts/postinstall.ts. On Windows the bare `bash` on PATH resolves to the WSL shim rather than Git Bash, so the shebang-based script ran in the wrong filesystem context. - node-pty: patch vendored winpty.gyp to invoke its build batch scripts (GetCommitHash.bat, UpdateGenVersion.bat) with an explicit `.\` prefix. This machine's NoDefaultCurrentDirectoryInExePath policy disables cmd's implicit current-directory search, which the scripts relied on. - postinstall: re-link node-pty's node-addon-api dependency, which `bun patch` drops when converting a patched package from a store symlink to a real copy. - terminal-host: use a Windows named pipe (\.\pipe\...) instead of a Unix-domain-socket-style file path for the daemon's IPC socket. net.Server.listen() on a plain path throws EACCES on Windows. - workspaces/git: retry worktree removal's rename() on Windows EBUSY/EPERM (a just-killed terminal session's process/ConPTY can hold a directory handle open briefly after exit), and replace the background cleanup's hardcoded `/bin/rm` with fs.rm on Windows.
…resets, CI
Makes the agent-integration layer (the hooks and shims behind agent status,
notifications, and the memory reflection loop) functional on Windows, plus
four smaller improvements. All macOS/Linux behavior is unchanged.
Agent integration on Windows:
- notify-hook: keep notify.sh canonical everywhere (codex/opencode/mastra
templates invoke it through bash), and additionally generate notify.mjs — a
Node port — on Windows for consumers that can't assume bash. Claude Code's
--settings hooks run it via an absolute node path resolved at setup.
- agent-wrappers: generate .cmd shims for claude/codex/opencode next to the
bash wrappers. cmd/PowerShell can't execute the extensionless bash scripts,
so without these the CLIs ran raw and every hook was silently absent. The
real binary path is resolved at setup (refreshed each app boot) and embedded.
- terminal env: prepend ~/.ade/bin to PATH for Windows sessions in
buildTerminalEnv — the shell rc wrappers that do this on Unix don't exist
for cmd/PowerShell.
- findRealBinary: only consider Windows-executable extensions and let PATH
directory order dominate (where.exe lists npm's extensionless sh shim
before the .cmd shim); compare case-insensitively on Windows; skip
agent-wrapper shims by content, matching the bash resolver.
- opencode plugin: escape backslashes when substituting the notify path into
the JS template (C:\Users... was being consumed as JS escapes).
OpenRouter models (kimi/minimax/glm):
- getAgentPresetCommands({windows}) emits a `cmd /c "set ...&&claude ..."`
launch command on Windows; the POSIX inline env-var prefix doesn't parse in
cmd/PowerShell. Settings preset templates use the platform-aware variant.
Shell and teardown:
- getDefaultShell probes pwsh.exe, then powershell.exe, then cmd on Windows
instead of always using COMSPEC (cmd.exe).
- teardown: run commands through cmd with windowsVerbatimArguments (libuv's
default quoting mangles embedded double quotes for cmd), kill hung
teardowns with taskkill /t (negative-PID group kill is POSIX-only), and
stop hardcoding /bin/bash on non-darwin.
Agent launch presets:
- A terminal preset named "agent:<runtime>" (e.g. agent:claude) overrides the
default agent launch command, making flags editable in Settings. The
explicit prefix avoids colliding with the seeded default presets; the
spawn path awaits the presets cache so a configured override can't be
missed by a first-mount race.
CI:
- windows-latest job (typecheck + compile, with the Spectre-mitigated MSVC
libs node-pty needs); fix stale @superset/desktop filter in the build job.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two commits bringing ADE from macOS-only to working end-to-end on Windows:
node-pty, replaces the shell postinstall script with a cross-platform TypeScript one, and makes git/terminal-host handling Windows-safe.Test plan
bun run compile:app+bunx electron .)🤖 Generated with Claude Code