refactor(macos): replace liquid glass with native menu vibrancy - #1121
Open
Harry19081 wants to merge 1 commit into
Open
refactor(macos): replace liquid glass with native menu vibrancy#1121Harry19081 wants to merge 1 commit into
Harry19081 wants to merge 1 commit into
Conversation
Use the public AppKit Menu material through existing objc2 bindings on all supported macOS versions. Keep native view ownership in the window hierarchy, make repeated toggles idempotent, and avoid retained registries or private corner-radius selectors. Preserve startup, recovery, detached-window, and external-page background flows. Remove the Liquid Glass plugin and its otherwise-unused legacy dependencies, including block 0.1.6. No new dependencies, version upgrades, IPC changes, or persisted-data migrations are introduced. Verification: one final workspace/all-targets cargo check; SDK API availability checks for Intel macOS 10.15-26 and arm64 macOS 11-26; rustfmt; cargo machete. Native visual and multi-version runtime verification were not performed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The macOS window material depends on
tauri-plugin-liquid-glass, which brings in the legacycocoa -> block 0.1.6dependency chain and Cargo's future-incompatibility warning. Its macOS 26 private glass variant and older-system fallback also use different material implementations. The requested replacement is Codex-style native Menu vibrancy that remains available across supported macOS versions.Solution
NSVisualEffectViewAPIs through the existingobjc2bindings: Menu material, behind-window blending, native autoresizing, and window-following active state. No macOS 26-only API or undocumented corner-radius selector is used.tauri-plugin-liquid-glass,block,cocoa,cocoa-foundation,objc,dispatch,malloc_buf) without adding or upgrading packages or changing retained checksums.docs/architecture/macos-window-material.md.Potential risks
The native surface visibly changes from AbuttedSidebar glass to Menu vibrancy and follows window activity. This matches Codex's native material choice, not its exact CSS appearance or its explicit unfocused/large-window opaque policy. Light/dark appearance, Reduce Transparency, clipping, resize/fullscreen, external displays, repeated toggles, startup/recovery, detached windows, and external-page navigation still need runtime visual verification.
The API availability checks below do not mean the app was run on every macOS release. No native UI was launched or controlled, in accordance with the user's explicit opt-in requirement for desktop control, so screenshots and runtime performance measurements are absent. The existing transparent-WKWebView private API configuration remains; the new material itself uses public APIs.
No deployment minimum, persisted data, schema, setting, IPC format, or Windows implementation changes. Rollback is a revert of this PR; no data recovery or migration is needed.
Verification
cargo check --workspace --all-targets --locked --offline— passed once on macOS 26.3 arm64 in 1m52s, with no warnings and noblockfuture-incompatibility notice.python3 /tmp/orgii-macos-vibrancy-checks/check_availability.py— passed 13 SDK availability checks using SDK 26.1 and an Objective-C probe exercising the selected native selectors/material. Each invocation usedxcrun clang -target <target> -isysroot <sdk> -fsyntax-only -fobjc-arc -Wall -Wextra -Werror -Werror=unguarded-availability -Werror=unguarded-availability-new <probe>. Targets: Intel macOS 10.15, 11, 12, 13, 14, 15, 26; arm64 macOS 11, 12, 13, 14, 15, 26. These are API/deployment checks, not OS runtime tests.rustfmt --check --edition 2021 --config skip_children=true src-tauri/crates/app-window/src/lib.rs src-tauri/crates/app-window/src/macos_material.rs src-tauri/crates/app-window/src/commands.rs— passed.CARGO_NET_OFFLINE=true cargo machete— passed, no unused dependencies.cargo update --workspace --offline— removed the unused plugin chain; lockfile comparison confirmed zero additions/upgrades, unchanged retained checksums, and noblockpackage.git diff --checkand changed-file private-material scan — passed. Reviewed all apply/clear callers, native view ownership, main-thread dispatch, and unchanged frontend/IPC behavior.Audit
Architecture coverage: layers 1 (compiler/API compatibility), 2 (dependency/view ownership), 3-4 (material naming), 5 (defaults), 6-7 (native boundary), 9 (startup/recovery/detached/toggle parity), and 10 (one material across supported OS versions). Layer 8 network-payload checks were skipped because no wire change exists; IPC signatures were inspected.