Skip to content

fix(gpui): make Windows startup reliable - #82

Merged
maddada merged 1 commit into
maddada:mainfrom
yossifyahya16:agent/fix-windows-project-startup
Aug 2, 2026
Merged

fix(gpui): make Windows startup reliable#82
maddada merged 1 commit into
maddada:mainfrom
yossifyahya16:agent/fix-windows-project-startup

Conversation

@yossifyahya16

@yossifyahya16 yossifyahya16 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • build and launch the native Windows GPUI app from bun run start under WSL without PowerShell
  • pin Zed, cef-rs, gpui-component, and Beads as repository-local .dependencies submodules while preserving the checked-in compatibility patch contract
  • translate local Win32 Add Project paths to canonical WSL paths before calling the Linux gxserver
  • tie application lifetime to the main workspace window so child modal/CEF windows cannot leave a headless process holding the CEF profile lock

Verification

  • completed a native Windows release build and launched E:\dev\ghostex\gpui\build\windows\Ghostex\Ghostex.exe
  • opened Add Project in the actual CEF UI, submitted E:\dev\ghostex, observed the modal close successfully, and confirmed gxserver stored /mnt/e/dev/ghostex
  • closed the main window normally and once with Add Project still open; the main process and every CEF helper exited in both cases
  • completed repeated fresh native launches with visible Zed::Window and Ghostex Sidebar targets; the CEF panic log stayed at its six pre-fix entries
  • ran Linux cargo +1.95.0 check --manifest-path gpui/Cargo.toml --bin ghostex-gpui
  • passed shell syntax checks, Bun bundle parsing, staged diff whitespace checks, and the clean gpui-component dependency patch verifier

GPUI tests were not added or run per the repository instructions.

Summary by CodeRabbit

  • New Features

    • Added WSL2 support for building and staging the Windows application from Bash.
    • Added support for x64 and ARM64 Windows targets.
    • Improved Windows path handling when adding projects from local or network locations.
    • Added clearer validation and reporting for build requirements and staged outputs.
  • Bug Fixes

    • Improved application shutdown behavior when the main window closes.
    • Build scripts now honor custom Cargo output locations and configurable CEF paths.
    • Improved Windows process management and runtime packaging.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f9609db1-4352-4a1b-9fa6-a55f25ef872a

📥 Commits

Reviewing files that changed from the base of the PR and between f057528 and 0485b84.

📒 Files selected for processing (16)
  • .dependencies/beads
  • .dependencies/cef-rs
  • .dependencies/gpui-component
  • .dependencies/zed
  • .gitmodules
  • gpui/Cargo.toml
  • gpui/scripts/build-linux-app.sh
  • gpui/scripts/build-windows-app-wsl.sh
  • gpui/scripts/prepare-macos-runtime.sh
  • gpui/src/main.rs
  • gxserver-rs/package-remote-linux.mjs
  • scripts/release-gpui/macos-prerequisite.sh
  • scripts/release-gpui/macos.sh
  • scripts/release-gpui/prepare-references.sh
  • scripts/release-gpui/verify-reference-contract.mjs
  • scripts/start-gpui.mjs

📝 Walkthrough

Walkthrough

The change adds pinned dependency submodules, updates GPUI and release paths, adds a WSL2 Windows build script, extends startup handling to WSL2, centralizes process termination, translates Windows project paths to WSL paths, and ties application shutdown to the main window.

Changes

GPUI dependency and build integration

Layer / File(s) Summary
Pinned dependency setup
.dependencies/*, .gitmodules, gpui/Cargo.toml, gpui/scripts/prepare-macos-runtime.sh, scripts/release-gpui/*, scripts/start-gpui.mjs, gxserver-rs/package-remote-linux.mjs
GPUI dependencies now use pinned .dependencies submodules. Git checks use safe-directory configuration. Checked-in patches and Beads discovery use repository-local paths.
Configurable build artifacts
gpui/scripts/build-linux-app.sh, gxserver-rs/package-remote-linux.mjs
Rust artifact paths now honor CARGO_TARGET_DIR. Beads builds disable VCS metadata embedding.
WSL2 Windows build and staging
gpui/scripts/build-windows-app-wsl.sh
The new script validates WSL2 and Windows tools, builds Windows binaries, verifies CEF resources, and stages application and runtime files.
Cross-platform startup and process control
scripts/start-gpui.mjs
Startup now supports native Windows and WSL2 through shared platform handling. Windows process discovery and termination use tasklist and taskkill.
GPUI request and window lifecycle
gpui/src/main.rs
Windows local project paths are translated to WSL paths. Main-window closure now controls application shutdown.

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

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant startGpui as start-gpui.mjs
  participant WSLBuild as build-windows-app-wsl.sh
  participant WindowsTools as Windows Cargo and cmd.exe
  participant Staging
  Developer->>startGpui: start GPUI on Windows or WSL2
  startGpui->>WSLBuild: select Windows build script
  WSLBuild->>WindowsTools: build release Windows binaries
  WindowsTools->>Staging: produce application binaries
  WSLBuild->>Staging: copy CEF, locales, assets, and runtime archives
Loading

Possibly related PRs

  • maddada/Ghostex#62: Adds GPUI macOS workflow integration that uses the build and release paths changed here.

Suggested reviewers: maddada

✨ 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.

🔧 ast-grep (0.45.0)
gpui/src/main.rs

ast-grep timed out on this file


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.

@maddada
maddada marked this pull request as ready for review August 2, 2026 15:02
@maddada
maddada merged commit a7d0ad4 into maddada:main Aug 2, 2026
1 check passed
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