Skip to content

feat(platform): add macOS support and fix cross-platform agent detection - #3

Merged
4nrry merged 2 commits into
mainfrom
claude/windows-macos-support-czq5ol
Jun 22, 2026
Merged

4nrry merged 2 commits into
mainfrom
claude/windows-macos-support-czq5ol

Conversation

@4nrry

@4nrry 4nrry commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Why

The README already framed macOS and Windows as "supported secondary platforms via Tauri 2", but in practice:

  • Agent detection didn't work on Windows. Rules match bare exe names (claude, node) and a Unix-only shell list, while sysinfo reports claude.exe/node.exe and Windows shells are cmd/powershell/pwsh. No agent would ever be detected.
  • macOS had no packaging at all — Linux (.deb) and Windows (NSIS .exe) had build scripts + release workflows, but there was no .dmg script/workflow.
  • CI only ran on Ubuntu, so cross-platform regressions were invisible.

What changed

Agent detection (opencherry_agents)

  • Match exe basenames extension-insensitively so claude.exe / node.exe match rules written as claude / node.
  • Recognize Windows shells (cmd, powershell, pwsh, wt, conhost, nu, …) in the require_shell_parent heuristic.
  • Normalize path separators (\ → /) so exe_path_contains rules and the Antigravity exclusion work with Windows paths.
  • Added unit tests for Windows exe names, Windows shells, and Windows shell-parent matching.

Packaging & CI

  • scripts/build-macos.sh — produces an unsigned .dmg (optional cross-arch via OPENCHERRY_MAC_TARGET).
  • .github/workflows/release-macos.yml — builds Apple Silicon (aarch64) + Intel (x86_64) .dmg images, attaching to v* releases or uploading as artifacts on workflow_dispatch.
  • .github/workflows/ci.yml — new cross-platform matrix running the library-crate tests on windows-latest and macos-latest.
  • tauri.conf.json — macOS minimumSystemVersion (10.15) and NSIS currentUser install mode (no admin prompt for an unsigned dev tool).
  • justfile — build-macos / build-windows recipes.

Docs

  • README: macOS .dmg install section + per-platform dependency notes.
  • AGENTS.md: updated CI/release workflow expectations.

Testing

  • cargo fmt --all -- --check ✅
  • cargo clippy -p opencherry_core -p opencherry_repo -p opencherry_agents -p opencherry_persistence --all-targets -- -D warnings ✅
  • cargo test on all four library crates ✅ (42 tests, including the new Windows-detection tests)
  • bash -n scripts/build-macos.sh ✅
  • Not run locally: full tauri build for .dmg/.exe (needs macOS/Windows hosts — that's what the release workflows are for) and the Linux desktop E2E (no WebKitWebDriver in this environment).

🤖 Generated with Claude Code

https://claude.ai/code/session_014PZXacyXbTKeZEn9uXoPWM


Generated by Claude Code

claude added 2 commits June 22, 2026 01:10
Make Windows and macOS first-class supported targets alongside Linux.

Agent detection (opencherry_agents):
- match exe basenames extension-insensitively so Windows `claude.exe`/
  `node.exe` match rules written as `claude`/`node`
- recognize Windows shells (cmd, powershell, pwsh, wt, ...) in the
  require_shell_parent heuristic
- normalize path separators so exe-path rules and the Antigravity
  exclusion match with Windows backslashes
- add tests covering Windows exe names, shells, and shell parents

Packaging & CI:
- add scripts/build-macos.sh producing an unsigned .dmg (with optional
  cross-arch via OPENCHERRY_MAC_TARGET)
- add release-macos.yml building aarch64 + x86_64 .dmg images
- add a cross-platform CI matrix running the library crate tests on
  windows-latest and macos-latest
- tauri.conf.json: macOS minimumSystemVersion + NSIS currentUser install
- justfile: build-macos / build-windows recipes

Docs: README macOS install + per-platform dependency notes; AGENTS.md CI
and release workflow notes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PZXacyXbTKeZEn9uXoPWM
The new cross-platform CI job surfaced two discard_files tests failing on
windows-latest: git checkout restored `\n` content as `\r\n` because the
runner sets core.autocrlf=true globally. Set core.autocrlf=false and
core.eol=lf on the test repo's local config so checkout/discard behavior
is deterministic across platforms.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014PZXacyXbTKeZEn9uXoPWM

@4nrry 4nrry left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Revisado! Testei localmente e os builds/testes no backend (Rust) e frontend (SolidJS) passaram com sucesso. O código para o suporte ao macOS parece ótimo.

@4nrry
4nrry merged commit d63dfb9 into main Jun 22, 2026
5 checks passed
@4nrry
4nrry deleted the claude/windows-macos-support-czq5ol branch June 22, 2026 16:39
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