Skip to content

fix(linux): restore the macOS build of the Tauri companion - #114243

Merged
steipete merged 2 commits into
mainfrom
steipete/fix-macos-tauri-build
Jul 27, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/fix-macos-tauri-build

Conversation

@steipete

@steipete steipete commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

apps/linux/src-tauri has not compiled for macOS since 2026-07-17:

error[E0599]: no method named `transparent` found for struct `WebviewWindowBuilder` in the current scope
   --> src/quickchat.rs:470:6

Tauri v2 gates WebviewWindowBuilder::transparent behind #[cfg(any(not(target_os = "macos"), feature = "macos-private-api"))]. Quick Chat calls it unconditionally, so the macOS target broke the moment the floating composer landed in 277f009 (#109947).

It went unnoticed for nine days because nothing compiles the macOS target per PR. linux-app.yml builds deb/appimage on Linux only, and the one job that does build macOS — build_macos in linux-app-release.yml — sits behind the manual desktop-test-bundles dispatch input.

Fix

Enable the macos-private-api cargo feature on the tauri dependency, plus the app.macOSPrivateApi config flag. Tauri requires the two to agree; with only the feature set, tauri-build fails the allowlist check:

The `tauri` dependency features on the `Cargo.toml` file does not match the allowlist defined under `tauri.conf.json`.

The feature is inert on Linux and Windows, and Cargo.lock is unchanged — it pulls in no new dependencies.

Dropping .transparent(true) on macOS would have compiled too, but it would ship something visibly wrong. quickchat.css sets html and body to background: transparent and paints the composer as a 16px-radius card at rgb(28 28 30 / 94%) with a 0 10px 36px drop shadow. Without an transparent window, macOS would draw an opaque rectangle around that rounded card and clip its shadow. Keeping the intended floating look is the reason the private API is worth it here.

Tradeoff, confirmed with the maintainer: Tauri documents that apps using the private API cannot ship through the Mac App Store. That costs this app nothing — it bundles and executes install-cli.sh, manages a local Gateway system service, and does mDNS discovery, none of which survive App Store sandboxing, and it already distributes through GitHub releases and a self-update channel.

Regression guard

Adds a check-macos job to linux-app.yml running cargo check --locked --all-targets on macOS, so the target that ships as a desktop-test bundle is compiled on every PR touching apps/linux/**.

The guard immediately found a second, unrelated break

On its first run the job failed — not on this change, but in tauri-plugin-notifications:

Swift build failed for target: arm64-apple-macosx13.0
NotificationPlugin.swift:133:63: error: consecutive statements on a line
  func showNotification(notification: Notification) async throws(FFIResult) -> UNNotificationRequest {

Those sources use typed throws (throws(FFIResult)), a Swift 6 feature. The macos-14 runner image still ships Swift 5.x and cannot parse them. It builds locally only because current macOS dev machines have Swift 6 (verified: Swift 6.4 here).

The important consequence: build_macos in linux-app-release.yml compiles the same crate on the same macos-14 image, so it could not have produced a macOS bundle either — invisible because that job only runs behind the manual desktop-test-bundles dispatch input. Both jobs move to macos-15.

Proof

Local, on macOS 27.0 (Apple silicon), after touching src/quickchat.rs to force a real recompile rather than a cache hit:

cargo check --locked --all-targets   # exit 0, 0 errors  (the exact CI command)
cargo build                          # exit 0, 0 errors

The same tree without these two settings still reproduces the E0599 above, so the new job would have caught the original break.

The macos-15 runner change is proven for check-macos by this PR's own CI. For build_macos it is unproven by design — that job is part of the release workflow and dispatching it is not something to do casually — but it compiles the same crate on the same image, so the same Swift 6 requirement applies.

Proof gap

Compilation and configuration are verified; Quick Chat's transparency was not visually confirmed at runtime on macOS. Doing so needs a bundle built under a throwaway identifier (a stale companion instance holds the single-instance lock) plus synthetic global-shortcut input. The transparency behavior itself is Tauri's documented contract for these two settings.

Tauri gates `WebviewWindowBuilder::transparent` behind its `macos-private-api`
feature on macOS, so the companion stopped compiling for macOS when Quick Chat
landed in #109947: `no method named 'transparent' found for struct
'WebviewWindowBuilder'`. Enable that feature together with the matching
`app.macOSPrivateApi` config flag, which Tauri requires to agree with it or
tauri-build fails the allowlist check.

Quick Chat is built for a transparent window - quickchat.css makes html and
body transparent behind a 16px-radius translucent card with a drop shadow - so
compiling macOS by dropping `.transparent(true)` would ship an opaque rectangle
instead of the floating composer.

Also add a per-PR macOS `cargo check`. The only job that compiled the macOS
target sits behind a manual dispatch input in linux-app-release.yml, which is
why a broken macOS build survived for nine days.
tauri-plugin-notifications' Swift sources use typed throws
(`throws(FFIResult)`), which requires Swift 6. The macos-14 runner image still
ships Swift 5.x and cannot parse them, so the plugin's build script panics with
"Swift build failed for target: arm64-apple-macosx13.0".

This hit the new per-PR check immediately, and it means the release workflow's
`build_macos` job could not have produced a macOS bundle either - it compiles
the same crate on the same image, but only runs behind a manual dispatch input
so nothing surfaced it. Move both to macos-15.
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 27, 2026
@clawsweeper

clawsweeper Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 26, 2026, 10:50 PM ET / July 27, 2026, 02:50 UTC.

ClawSweeper review

What this changes

Enables Tauri’s macOS private API for the Linux companion’s transparent Quick Chat window and adds macOS compilation coverage to the companion workflows.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for maintainer review. The patch directly restores a macOS compile path broken by the merged Quick Chat feature and adds a per-PR macOS compile guard; the remaining question is the intentional distribution tradeoff of enabling Tauri’s macOS private API.

Priority: P2
Reviewed head: f0ce959bb8bd39a27fe9aae9162c93148cd7e936
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, contract-aligned repair with credible native compilation proof; only the macOS distribution-policy confirmation remains before merge.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The PR body provides after-fix macOS terminal proof for the exact compile command and a native build, plus CI evidence for the new macOS check; the unverified visual transparency path is not the primary behavior changed by this repair.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body provides after-fix macOS terminal proof for the exact compile command and a native build, plus CI evidence for the new macOS check; the unverified visual transparency path is not the primary behavior changed by this repair.
Evidence reviewed 5 items Current-main gap: The PR’s base diff shows current main’s Tauri dependency does not enable macos-private-api, while the merged Quick Chat feature calls the macOS-gated transparent-window API; the proposed Cargo feature and matching Tauri config flag address that contract together.
Configuration contract: The patch adds app.macOSPrivateApi: true alongside the Cargo feature, matching Tauri’s build-time requirement that the Rust feature and application allowlist agree.
Regression guard: The new macOS workflow job runs cargo +stable check --locked --all-targets for the native companion on every relevant PR; the release workflow is also moved from macos-14 to macos-15 for the Swift 6-dependent notification plugin.
Findings None None.
Security None None.

How this fits together

The Tauri companion packages OpenClaw’s local desktop UI for Linux and macOS test bundles. Quick Chat creates a transparent floating webview, while GitHub Actions compiles the native crate before release bundles can be produced.

flowchart LR
  A[Quick Chat window request] --> B[Tauri window builder]
  B --> C[macOS transparent-window API]
  C --> D[Companion native crate]
  D --> E[macOS CI compile check]
  E --> F[Release test bundles]
Loading

Decision needed

Question Recommendation
Should the companion intentionally enable Tauri’s macOS private API and therefore forgo Mac App Store eligibility in order to preserve Quick Chat’s transparent floating-window design? Confirm external distribution: Confirm that GitHub releases and the self-update channel are the supported macOS distribution path, then merge the repair and compile guard.

Why: The code repair follows Tauri’s paired feature/config contract, but the repository evidence available here does not independently establish the intended macOS distribution policy.

Before merge

  • Resolve merge risk (P1) - Enabling macos-private-api deliberately makes the macOS companion ineligible for Mac App Store distribution; the patch is technically coherent, but a maintainer should explicitly confirm that GitHub-release and self-update distribution remain the supported policy.
Agent review details

Security

None.

PR surface

Config +43, Other +10. Total +53 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 2 44 1 +43
Generated 0 0 0 0
Other 2 11 1 +10
Total 4 55 2 +53

Review metrics

Metric Value Why it matters
Application distribution capability 1 internal Tauri capability enabled macOSPrivateApi changes the companion’s macOS distribution eligibility, so the policy tradeoff merits visible owner confirmation before merge.

Stored data model

Persistent data-model change detected: persistent cache schema: .github/workflows/linux-app.yml. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: same_root_cause
Canonical: #109947
Summary: This repair addresses the macOS compile regression introduced when the merged Quick Chat feature began creating a transparent Tauri window.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Confirm the distribution policy (recommended)
    Accept the Mac App Store incompatibility only after an owner confirms that external distribution is the intended supported macOS route.
  2. Redesign without private APIs
    Pause this patch and replace the transparent-window dependency with an App-Store-compatible macOS presentation if that channel remains a product requirement.

Technical review

Best possible solution:

Confirm the companion is intentionally distributed outside the Mac App Store, then retain the paired Tauri feature/config setting and the macOS-15 compile guard so future platform-gated APIs fail in CI.

Do we have a high-confidence way to reproduce the issue?

Yes. The PR supplies a concrete current-base macOS reproduction: cargo check --locked --all-targets fails when Quick Chat calls Tauri’s macOS-gated transparent-window API without the paired private-API feature and config setting.

Is this the best way to solve the issue?

Unclear pending product confirmation. The paired Cargo feature and Tauri config are the narrowest technical repair and preserve the existing floating composer, but maintainers must confirm that losing Mac App Store eligibility is intentional.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 570eab59e7c7.

Labels

Label justifications:

  • P2: This is a bounded native-companion build regression with a clear repair and limited user blast radius.
  • merge-risk: 🚨 compatibility: The new Tauri private-API setting changes whether the macOS companion can be distributed through the Mac App Store.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body provides after-fix macOS terminal proof for the exact compile command and a native build, plus CI evidence for the new macOS check; the unverified visual transparency path is not the primary behavior changed by this repair.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix macOS terminal proof for the exact compile command and a native build, plus CI evidence for the new macOS check; the unverified visual transparency path is not the primary behavior changed by this repair.

Evidence

What I checked:

  • Current-main gap: The PR’s base diff shows current main’s Tauri dependency does not enable macos-private-api, while the merged Quick Chat feature calls the macOS-gated transparent-window API; the proposed Cargo feature and matching Tauri config flag address that contract together. (apps/linux/src-tauri/Cargo.toml:24, 570eab59e7c7)
  • Configuration contract: The patch adds app.macOSPrivateApi: true alongside the Cargo feature, matching Tauri’s build-time requirement that the Rust feature and application allowlist agree. (apps/linux/src-tauri/tauri.conf.json:23, f0ce959bb8bd)
  • Regression guard: The new macOS workflow job runs cargo +stable check --locked --all-targets for the native companion on every relevant PR; the release workflow is also moved from macos-14 to macos-15 for the Swift 6-dependent notification plugin. (.github/workflows/linux-app.yml:92, f0ce959bb8bd)
  • Feature provenance: The related merged Quick Chat change introduced the transparent floating composer, and this PR identifies the resulting macOS-only compile gap as the same feature’s missing platform configuration. (apps/linux/src-tauri/src/quickchat.rs:470, 277f009cc902)
  • Maintainer-review context: The prior ClawSweeper cycle found no patch defect and identified only the need to independently confirm the stated non-App-Store distribution decision before merge. (2caf4dd910ab)

Likely related people:

  • steipete: Authored the merged Quick Chat implementation that introduced the transparent webview and both commits in this focused repair, giving them direct history across the affected native companion path. (role: Quick Chat feature owner and recent area contributor; confidence: high; commits: 277f009cc902, 2caf4dd910ab, f0ce959bb8bd; files: apps/linux/src-tauri/src/quickchat.rs, apps/linux/src-tauri/Cargo.toml, apps/linux/src-tauri/tauri.conf.json)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record an explicit owner confirmation that the companion is intentionally not Mac App Store distributable.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-07-27T02:41:32.813Z sha 2caf4dd :: needs maintainer review before merge. :: none

@steipete
steipete merged commit e94796e into main Jul 27, 2026
115 of 117 checks passed
@steipete
steipete deleted the steipete/fix-macos-tauri-build branch July 27, 2026 02:57
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 27, 2026
…114243)

* fix(linux): restore the macOS build of the Tauri companion

Tauri gates `WebviewWindowBuilder::transparent` behind its `macos-private-api`
feature on macOS, so the companion stopped compiling for macOS when Quick Chat
landed in openclaw#109947: `no method named 'transparent' found for struct
'WebviewWindowBuilder'`. Enable that feature together with the matching
`app.macOSPrivateApi` config flag, which Tauri requires to agree with it or
tauri-build fails the allowlist check.

Quick Chat is built for a transparent window - quickchat.css makes html and
body transparent behind a 16px-radius translucent card with a drop shadow - so
compiling macOS by dropping `.transparent(true)` would ship an opaque rectangle
instead of the floating composer.

Also add a per-PR macOS `cargo check`. The only job that compiled the macOS
target sits behind a manual dispatch input in linux-app-release.yml, which is
why a broken macOS build survived for nine days.

* ci(linux): build the macOS companion on macos-15

tauri-plugin-notifications' Swift sources use typed throws
(`throws(FFIResult)`), which requires Swift 6. The macos-14 runner image still
ships Swift 5.x and cannot parse them, so the plugin's build script panics with
"Swift build failed for target: arm64-apple-macosx13.0".

This hit the new per-PR check immediately, and it means the release workflow's
`build_macos` job could not have produced a macOS bundle either - it compiles
the same crate on the same image, but only runs behind a manual dispatch input
so nothing surfaced it. Move both to macos-15.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: linux maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant