Skip to content

fix(ui): let macOS windows inherit app appearance - #11095

Open
proggeramlug wants to merge 2 commits into
PerryTS:mainfrom
proggeramlug:fix/11092-macos-window-appearance
Open

proggeramlug wants to merge 2 commits into
PerryTS:mainfrom
proggeramlug:fix/11092-macos-window-appearance

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • let the main macOS window inherit NSApp's effective appearance
  • preserve normal system appearance following while honoring NSRequiresAquaSystemAppearance from an app bundle
  • add a native AppKit regression test for the window appearance contract

Root cause

app_create read the global system appearance and assigned Aqua or Dark Aqua directly to the window. That explicit window setting took precedence over the application or bundle appearance, so an app could not pin itself to Aqua.

Validation

  • cargo test --profile perry-dev -p perry-ui-macos
  • cargo fmt --all -- --check
  • python3 scripts/check_test_registration.py
  • ./scripts/check_file_size.sh
  • git diff --check

Fixes #11092

Summary by CodeRabbit

  • Bug Fixes
    • macOS windows now follow the application’s effective appearance. Apps configured to stay in light mode retain that appearance, while other apps continue to follow the system’s appearance by default.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: ceb96778-dc5d-4881-a440-5053e6a012b8

📥 Commits

Reviewing files that changed from the base of the PR and between e27f0a0 and 66c3431.

📒 Files selected for processing (4)
  • changelog.d/11095-macos-window-appearance.md
  • crates/perry-ui-macos/Cargo.toml
  • crates/perry-ui-macos/src/app.rs
  • crates/perry-ui-macos/tests/native_window_appearance.rs

Included review availability: Your plan provides up to 8 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

macOS window creation no longer assigns a named appearance based on the system dark-mode setting. The window inherits the application’s effective appearance. A registered native integration test checks that the window appearance is unset.

Changes

Window appearance inheritance

Layer / File(s) Summary
Leave window appearance unset
crates/perry-ui-macos/src/app.rs, crates/perry-ui-macos/Cargo.toml, crates/perry-ui-macos/tests/native_window_appearance.rs, changelog.d/11095-macos-window-appearance.md
app_create no longer queries the system dark-mode setting or assigns a named window appearance. The registered macOS integration test checks that app_create adds one window and that its appearance is unset. The changelog describes appearance inheritance and the NSRequiresAquaSystemAppearance behavior.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 66c34

MacOS windows can inherit the app’s appearance, including its light-mode setting. No issue identified here prevents merging after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary change: macOS windows now inherit the application appearance.
Description check ✅ Passed The description explains the change, root cause, validation steps, and linked issue. It is mostly complete despite not using the template headings for Changes and Test plan or including the checklist …
Linked Issues check ✅ Passed Issue [#11092] requires a way for macOS windows to use the app-level appearance. The PR removes the per-window Aqua/Dark Aqua assignment from app_create, so the window appearance remains unset and i…
Out of Scope Changes check ✅ Passed The changed files stay within issue [#11092]. The source change implements inherited window appearance. The Cargo test registration and native regression test verify the required contract. The changel…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (2 skipped: 2 …
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

macOS: no way to pin an app to the light appearance (windows are forced to match the system)

1 participant