Skip to content

feat(wework): add Windows desktop support - #1950

Merged
qdaxb merged 5 commits into
wecode-ai:mainfrom
sdadunderscoresdad:feat/add-windows-support
Jul 14, 2026
Merged

qdaxb merged 5 commits into
wecode-ai:mainfrom
sdadunderscoresdad:feat/add-windows-support

Conversation

@sdadunderscoresdad

@sdadunderscoresdad sdadunderscoresdad commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add native Windows desktop support for wework and the local Executor sidecar while keeping existing macOS behavior unchanged.

  • Replace Unix domain sockets with TCP loopback for local Executor IPC; the sidecar binds to 127.0.0.1:0, writes the bound address to ~/.wegent-executor/app-ipc.addr, and Tauri reads that file to discover the port.
  • Use dirs::home_dir() for cross-platform home directory resolution so Windows uses USERPROFILE instead of relying on the HOME environment variable.
  • Add Windows executable extension handling (codex.exe, .cmd, .bat, .com) and fallback search paths for npm/cargo binaries when the GUI process does not inherit shell PATH.
  • Default the local terminal to PowerShell on Windows, trying pwsh.exe first and falling back to powershell.exe.
  • Gate macOS-only features—process diagnostics, embedded browser screenshot, CLI launcher, and tray usage icon—behind #[cfg(target_os = "macos")].
  • Add Windows tray icon support and a Windows-specific Tauri bundle config (tauri.windows.conf.json).
  • Add repository build scripts (wework/scripts/build-windows-app.sh, build-windows-sidecar.sh, patch-windows-nsis.py) and NSIS installer hooks to kill running sidecar processes before upgrade.
  • Add bilingual developer guides: docs/en/developer-guide/wework-windows.md and docs/zh/developer-guide/wework-windows.md.

Test plan

  • cd wework && pnpm run build:windows succeeds on macOS and produces the NSIS installer.
  • Install and launch the generated WeWork_0.0.15_x64-setup.exe on Windows 10/11.
  • Verify the Executor sidecar starts and Tauri connects via ~/.wegent-executor/app-ipc.addr.
  • Verify the local terminal opens PowerShell on Windows.
  • Verify macOS dev/build (pnpm exec tauri dev) still works and no macOS-only helpers leak into Windows builds.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Windows desktop build, cross-compilation, installer packaging, and troubleshooting support.
    • Added Windows terminal support using PowerShell or PowerShell 7.
    • Added Windows-compatible local communication using TCP loopback.
    • Improved Windows discovery of Codex and Claude executables.
    • Added Windows installer handling to stop running app processes before updates.
  • Documentation
    • Added comprehensive Windows build and runtime guides in English and Chinese.
  • Bug Fixes
    • Improved cross-platform home-directory resolution and Windows tray icon behavior.

jiaqi62 and others added 2 commits July 14, 2026 18:24
- Replace Unix domain sockets with TCP loopback for Executor IPC
- Use dirs::home_dir() for cross-platform home directory resolution
- Add Windows executable and binary resolution with fallback paths
- Add PowerShell support for local terminal
- Gate macOS-only features (process diagnostics, screenshots, CLI launcher)
- Add Windows build scripts and NSIS installer hooks
- Add Windows tray icon handling

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5dd878bd-a253-41da-ac21-1c0c7de1f7c1

📥 Commits

Reviewing files that changed from the base of the PR and between 4f03347 and 068d8d1.

⛔ Files ignored due to path filters (2)
  • executor/Cargo.lock is excluded by !**/*.lock
  • wework/src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (40)
  • docs/en/developer-guide/wework-windows.md
  • docs/zh/developer-guide/wework-windows.md
  • executor/Cargo.toml
  • executor/src/agents/claude_code.rs
  • executor/src/agents/codex.rs
  • executor/src/agents/git_auth.rs
  • executor/src/agents/git_workspace.rs
  • executor/src/agents/mod.rs
  • executor/src/agents/runtime_capabilities.rs
  • executor/src/attachments/multimodal_prompt.rs
  • executor/src/claude_session.rs
  • executor/src/config/device.rs
  • executor/src/local/app_ipc.rs
  • executor/src/local/backend/capability.rs
  • executor/src/local/backend/config.rs
  • executor/src/local/backend/session_events.rs
  • executor/src/local/capabilities.rs
  • executor/src/local/command.rs
  • executor/src/local/local_skills.rs
  • executor/src/runtime_work/codex_global_state.rs
  • executor/src/runtime_work/handler.rs
  • executor/src/runtime_work/store.rs
  • executor/src/runtime_work/worktrees.rs
  • executor/src/server/mod.rs
  • executor/src/services/updater/process_manager.rs
  • executor/src/services/updater/updater_service.rs
  • executor/tests/local_app_ipc_contract.rs
  • wework/e2e/desktop/task-flow.e2e.mjs
  • wework/package.json
  • wework/scripts/build-windows-app.sh
  • wework/scripts/build-windows-sidecar.sh
  • wework/scripts/patch-windows-nsis.py
  • wework/src-tauri/Cargo.toml
  • wework/src-tauri/nsis/installer-hooks.nsh
  • wework/src-tauri/src/embedded_browser.rs
  • wework/src-tauri/src/lib.rs
  • wework/src-tauri/src/local_executor.rs
  • wework/src-tauri/src/local_terminal.rs
  • wework/src-tauri/tauri.conf.json
  • wework/src-tauri/tauri.windows.conf.json

📝 Walkthrough

Walkthrough

This change adds Windows build and packaging workflows, migrates local Executor IPC from Unix sockets to TCP address files, adds Windows terminal and tray support, improves cross-platform path and executable discovery, and documents native and macOS cross-compilation procedures.

Changes

Windows desktop support

Layer / File(s) Summary
Cross-platform paths and executable discovery
executor/Cargo.toml, executor/src/agents/*, executor/src/runtime_work/*, executor/src/services/updater/*, executor/src/local/*
Adds dirs-based home resolution and Windows-aware Codex and Claude executable lookup.
TCP app IPC and sidecar connection flow
executor/src/local/app_ipc.rs, executor/tests/local_app_ipc_contract.rs, wework/src-tauri/src/local_executor.rs
Replaces Unix sockets with TCP loopback and app-ipc.addr discovery, updates sidecar connection and cleanup logic, adds Windows built-in commands, and updates contract tests.
Windows terminal, tray, and Tauri runtime
wework/src-tauri/src/{local_terminal.rs,lib.rs,embedded_browser.rs}, wework/src-tauri/{Cargo.toml,tauri.conf.json,tauri.windows.conf.json}, wework/src-tauri/nsis/*
Adds Windows PowerShell selection, platform-specific tray icons and compilation guards, Windows Tauri configuration, and preinstall process termination.
Windows build and installer pipeline
wework/package.json, wework/scripts/*
Adds sidecar and application build scripts plus NSIS patching and repackaging.
Windows build and runtime documentation
docs/{en,zh}/developer-guide/wework-windows.md
Documents prerequisites, native and cross-compiled builds, TCP IPC behavior, limitations, and troubleshooting.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant WeWork as Tauri local_executor
  participant Executor as Windows Executor
  participant AddrFile as app-ipc.addr
  WeWork->>Executor: launch sidecar
  Executor->>AddrFile: write TCP loopback address
  WeWork->>AddrFile: read resolved address
  WeWork->>Executor: connect over TCP
  Executor-->>WeWork: ready event and responses
Loading

Possibly related PRs

Suggested reviewers: ficohu, qdaxb

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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