Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

@ibetitsmike ibetitsmike commented Nov 9, 2025

Adds comprehensive cross-platform path handling to support Windows builds alongside Unix systems.

Changes

  • New PlatformPaths utility class - Single source of truth for all path operations

    • Handles Windows drive letters (C:) and UNC paths (\server\share)
    • Correctly splits paths using both forward and backslash separators
    • Platform-aware home directory expansion (~/ on Unix, %USERPROFILE% on Windows)
    • Fish-style path abbreviation that works on both platforms
  • Replaced all direct path operations throughout the codebase:

    • path.basename()PlatformPaths.basename()
    • expandTilde()PlatformPaths.expandHome()
    • abbreviatePath()PlatformPaths.abbreviate()
    • Manual path splitting → PlatformPaths.parse()
  • Comprehensive test coverage - Tests verify correct behavior on both platforms

Testing

  • All existing tests pass
  • New PlatformPaths tests verify Windows and Unix path handling
  • Type checking passes

Generated with mux

@ibetitsmike ibetitsmike changed the title 🤖 fix: Windows build fix: Windows compatibility Nov 9, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- Revert SSHRuntime/LocalRuntime/process cleanup edits
- Remove platform-specific path layer and UI formatting
- Restore bashExecutionService, execAsync, tests to main
- Keep Windows build: Makefile bash shell + release.yml Windows job + setup-cmux action

Only 3 files changed vs main: Makefile, release.yml, setup-cmux action.yml

_Generated with `cmux`_.
…#572)

This PR improves Windows build compatibility by introducing a
conditional `RUNNER` variable in the Makefile.

- **Add RUNNER variable** that conditionally uses:
  - `npx` on Windows (where `bun x` doesn't correctly pass arguments)
  - `bun x` on non-Windows systems for better performance

- **Update all 30+ commands** to use `$(RUNNER)` instead of hardcoded
`bun x` or `npx`

- **Add explanatory comments** for Windows-specific behavior

On Windows, `bun x` doesn't correctly pass arguments to commands,
causing build failures. This change ensures consistent build behavior
across all platforms by using the appropriate tool for each OS.

```makefile
ifeq ($(OS),Windows_NT)
RUNNER := npx
else
RUNNER := bun x
endif
```

All commands now use `$(RUNNER)` for cross-platform compatibility.

_Generated with `cmux`_
@ibetitsmike ibetitsmike force-pushed the mike/windows-build-fix branch from 95b7df0 to b09c032 Compare November 13, 2025 19:31
- Add PlatformPaths class to handle Windows and Unix paths correctly
- Replace all direct path operations with PlatformPaths methods
- Support Windows drive letters, UNC paths, and backslash separators
- Maintain consistent path abbreviation across platforms
- Add comprehensive tests for all path operations
@ibetitsmike ibetitsmike changed the title fix: Windows compatibility 🤖 fix: add cross-platform path handling for Windows compatibility Nov 13, 2025
- Remove unused path imports
- Add eslint-disable comments for process usage in paths.ts (main-only functions)
- Ensure compatibility with both main and renderer contexts
@ibetitsmike ibetitsmike added this pull request to the merge queue Nov 14, 2025
Merged via the queue into main with commit 27b6a10 Nov 14, 2025
13 checks passed
@ibetitsmike ibetitsmike deleted the mike/windows-build-fix branch November 14, 2025 09:55
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