Port application appearance override and const HSLA constructors - #6
Merged
Merged
Conversation
审查者指南通过 GPUI 的公共、平台和测试接口传递应用程序外观覆盖设置和延迟外观回调,并支持 macOS 原生窗口装饰及回归测试覆盖;同时使 HSLA 颜色构造函数兼容 延迟窗口外观通知的时序图sequenceDiagram
participant App as App update
participant TestWindow
participant ForegroundExecutor
participant WindowObserver
App->>TestWindow: simulate_appearance_change(WindowAppearance::Dark)
TestWindow->>ForegroundExecutor: spawn deferred appearance update
App-->>App: cx.update completes
ForegroundExecutor->>WindowObserver: appearance_changed
WindowObserver-->>WindowObserver: observe_window_appearance callback
文件级变更
提示和命令与 Sourcery 交互
自定义你的体验访问你的控制面板以:
获取帮助Original review guide in EnglishReviewer's GuidePorts application appearance overrides and deferred appearance callbacks through GPUI’s public, platform, and test surfaces, with macOS native chrome support and regression coverage; also makes HSLA color constructors const-compatible. Sequence diagram for deferred window appearance notificationsequenceDiagram
participant App as App update
participant TestWindow
participant ForegroundExecutor
participant WindowObserver
App->>TestWindow: simulate_appearance_change(WindowAppearance::Dark)
TestWindow->>ForegroundExecutor: spawn deferred appearance update
App-->>App: cx.update completes
ForegroundExecutor->>WindowObserver: appearance_changed
WindowObserver-->>WindowObserver: observe_window_appearance callback
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
cursor
Bot
force-pushed
the
cursor/appearance-override-color-09ea
branch
from
August 29, 2026 09:34
3131209 to
4354dec
Compare
freefcw
marked this pull request as ready for review
August 29, 2026 09:40
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Add App::set_window_appearance so tray and daemon apps can force light or dark independently of the OS. macOS sets NSApplication.appearance for native chrome; Linux, Windows, and the test platform store the override so window_appearance() reports it. The facade compile surface covers the new App method. Zed-Origin: 8e4e5a39eed932d943cb7a3e7078885b75d1ea54 Co-authored-by: freefcw <freefcw@gmail.com>
Run Window::appearance_changed on the foreground executor so AppKit (or a test simulation) can notify appearance observers without re-entering an in-progress App borrow. Teach the test window to record and replay appearance changes, and add a regression that asserts observers fire only after the current update ends. Zed-Origin: a11083f9a79495e9c7ddee0c5782f22d07695c31 Co-authored-by: freefcw <freefcw@gmail.com>
Mark hsla and opaque_grey as const fn so colors can be constructed in const contexts. Existing color tests plus a compile-time const check cover the change. Zed-Origin: 63b52a7ee354741a7485e8a20ab087a485fcb8a1 Co-authored-by: freefcw <freefcw@gmail.com>
macOS CI failed to compile to_native: NSAppearanceName* are extern statics and must be read inside unsafe. Keep appearanceNamed itself in safe code. Co-authored-by: freefcw <freefcw@gmail.com>
cursor
Bot
force-pushed
the
cursor/appearance-override-color-09ea
branch
from
August 29, 2026 12:06
4cb72b3 to
5519e7d
Compare
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.
Port two deferred Zed GPUI items that need a core/platform contract, plus the small const-color nicety. Not a wholesale sync.
Rebased onto
develop/0.9at2ce2baf01d0efea99b0efea1471248539cc8a232(PR #3).Ports
Application appearance override (
8e4e5a39eed932d943cb7a3e7078885b75d1ea54)e18c1a9App::set_window_appearance(Option<WindowAppearance>)paired with the existing getterPlatform::set_window_appearancedefault, wired through core, test, visual-test, macOS, Linux, and WindowsNSApplication.appearanceso native chrome matches a forced themewindow_appearance()reports it (tray/daemon apps can force light/dark)pub use gpui_core::*Deferred appearance callbacks (
a11083f9a79495e9c7ddee0c5782f22d07695c31)f092aaaWindowappearance observers run on the foreground executor to avoid re-entrantAppborrowscx.updateand fire afterrun_until_parkedConst color API (
63b52a7ee354741a7485e8a20ab087a485fcb8a1)00e8c1ehslaandopaque_greyareconst fnFollow-up
5519e7d— macOSto_nativenow readsNSAppearanceName*extern statics insideunsafe. That was a real compile failure on the macOS CI jobs (error[E0133]).Skipped hunks
init_app_appearanceincrates/zed(editor-only)window_appearanceexample — not in the upstream commit payloadview_did_change_effective_appearancecomment/traffic-light tweak: local callback already differs and does not callmove_traffic_lightthereAuthorship
Author and committer: Jun He <freefcw@gmail.com>
One commit per topic, each with a full
Zed-Origintrailer. QuitMode and Adabraka desktop APIs are untouched.Sourcery 摘要
支持强制设置应用程序窗口外观、安全地安排外观变更通知,并启用
const颜色构造函数。新功能:
错误修复:
增强功能:
测试:
Original summary in English
Sourcery 摘要
支持应用程序外观覆盖,安全地延迟外观通知,并支持
const颜色构造函数。新功能:
错误修复:
增强功能:
测试:
Original summary in English
Sourcery 摘要
支持应用程序外观覆盖,安全地延迟外观通知,并启用
const颜色构造函数。新功能:
错误修复:
增强功能:
测试:
Original summary in English
Sourcery 摘要
支持应用程序外观覆盖,安全地延迟外观通知,并启用
const颜色构造函数。新功能:
错误修复:
增强功能:
测试:
Original summary in English
Sourcery 总结
支持应用程序外观覆盖,安全地延迟外观通知,并启用
const颜色构造函数。新功能:
错误修复:
增强功能:
测试:
Original summary in English
Summary by Sourcery
Support application appearance overrides, safely defer appearance notifications, and enable const color constructors.
New Features:
Bug Fixes:
Enhancements:
Tests: