Skip to content

Commit 2caf4dd

Browse files
committed
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 #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.
1 parent 7846a32 commit 2caf4dd

3 files changed

Lines changed: 47 additions & 1 deletion

File tree

‎.github/workflows/linux-app.yml‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,39 @@ jobs:
8989
path: |
9090
apps/linux/src-tauri/target/release/bundle/deb/*.deb
9191
apps/linux/src-tauri/target/release/bundle/appimage/*.AppImage
92+
93+
check-macos:
94+
name: Check macOS companion
95+
# This app also ships macOS desktop-test bundles, but the only job that
96+
# compiles them (linux-app-release.yml build_macos) runs behind a manual
97+
# dispatch input. Without a per-PR check, a macOS-gated Tauri API can break
98+
# the macOS target for weeks unnoticed - `WebviewWindowBuilder::transparent`
99+
# did exactly that. Match that job's runner so this proves the same target.
100+
runs-on: macos-14
101+
timeout-minutes: 30
102+
steps:
103+
- name: Checkout
104+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
105+
with:
106+
fetch-depth: 1
107+
fetch-tags: false
108+
persist-credentials: false
109+
submodules: false
110+
111+
- name: Install Rust
112+
run: rustup toolchain install stable --profile minimal
113+
114+
- name: Cache Cargo
115+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
116+
with:
117+
path: |
118+
~/.cargo/registry
119+
~/.cargo/git
120+
apps/linux/src-tauri/target
121+
key: macos-app-${{ runner.os }}-${{ hashFiles('apps/linux/src-tauri/Cargo.lock') }}
122+
restore-keys: |
123+
macos-app-${{ runner.os }}-
124+
125+
- name: Check macOS companion
126+
working-directory: apps/linux/src-tauri
127+
run: cargo +stable check --locked --all-targets

‎apps/linux/src-tauri/Cargo.toml‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,16 @@ serde = { version = "1.0.228", features = ["derive"] }
2424
serde_json = "1.0.150"
2525
sha2 = "0.11.0"
2626
subtle = "2.6.1"
27-
tauri = { version = "2.11.5", features = ["image-png", "tray-icon", "unstable"] }
27+
# macos-private-api backs Quick Chat's transparent window. Tauri gates
28+
# `WebviewWindowBuilder::transparent` behind it on macOS, and the feature must
29+
# stay in sync with `app.macOSPrivateApi` in tauri.conf.json or tauri-build
30+
# fails. It is inert on Linux and Windows.
31+
tauri = { version = "2.11.5", features = [
32+
"image-png",
33+
"macos-private-api",
34+
"tray-icon",
35+
"unstable",
36+
] }
2837
tauri-plugin-autostart = "2.5.1"
2938
tauri-plugin-deep-link = "2.4.9"
3039
tauri-plugin-global-shortcut = "2.3.2"

‎apps/linux/src-tauri/tauri.conf.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
}
2121
},
2222
"app": {
23+
"macOSPrivateApi": true,
2324
"withGlobalTauri": true,
2425
"windows": [
2526
{

0 commit comments

Comments
 (0)