refactor: split personalization-manager-v1 protocol - #97
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wineee The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideReplaces the active personalization-manager-v1 protocol with dedicated experimental protocols for observable and privileged system appearance, per-window background blending, and SSD decoration customization, while retaining the original XML as deprecated and documenting migration, push-based state synchronization, and normalized protocol semantics. Sequence diagram for push-based system appearance synchronizationsequenceDiagram
participant Client
participant Appearance as SystemAppearance
participant Manager as AppearanceManager
participant Compositor
Client->>Appearance: bind
Appearance-->>Client: cursor_theme
Appearance-->>Client: color_scheme
Appearance-->>Client: window_opacity
Client->>Manager: set_color_scheme
Manager->>Compositor: apply setting
Compositor-->>Appearance: color_scheme
Appearance-->>Client: color_scheme
Sequence diagram for per-window decoration and blending setupsequenceDiagram
participant App
participant XDG as XDGDecoration
participant Decoration as WindowDecoration
participant Blend as WindowBlend
participant Compositor
App->>XDG: set_mode(server_side)
App->>Decoration: get_window_context
App->>Decoration: set_titlebar(disable)
Decoration->>Compositor: apply SSD customization
App->>Blend: get_window_context
Blend-->>App: supported_modes
App->>Blend: set_blend_mode(blur)
Blend->>Compositor: apply background compositing
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
a163453 to
e31071e
Compare
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="dde/README.md" line_range="12" />
<code_context>
+| `treeland-system-appearance-manager-unstable-v1.xml` | `treeland_system_appearance_manager_unstable_v1` | `treeland_system_appearance_manager_v1` | Privileged system-wide appearance configuration: cursor theme/size, global font, icon theme, active color, window opacity, theme type, titlebar height, global corner radius |
</code_context>
<issue_to_address>
**nitpick:** The English DDE registry adds `treeland-system-appearance-manager-unstable-v1.xml`, but the repository's parallel `dde/README.zh_CN.md` still lists the removed active `treeland-personalization-manager-v1.xml` and omits the new manager protocol. The Chinese registry therefore tells readers to use a file that is no longer installed in the active DDE set and does not document the replacement.
**Triggers:** When users consult the Chinese DDE protocol registry after upgrading to 0.6.0.
**Suggested fix:** Update `dde/README.zh_CN.md` to remove the deprecated personalization entry, add the system-appearance manager entry, and document the migration.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
00fd979 to
f898974
Compare
1. Split personalization-manager-v1 into three role-scoped protocols. 2. window-decoration (public): per-window SSD customization, needs xdg-decoration. 3. system-appearance (public): read-only system appearance query/observation. 4. system-appearance-manager (dde): privileged appearance configuration. 5. Per-window background blur now uses upstream ext-background-effect-v1. 6. Old wallpaper blend mode is deprecated without replacement. 7. Move original file to deprecated/ unchanged. 8. Standardize lifecycle: destroy first, enums before requests, events after. 9. Drop redundant get_* requests (push model). 10. Cursor: verfity event -> committed event + commit_result enum. 11. theme_type: drop auto; standardize light=0, dark=1. Log: Split personalization-manager-v1 into three role-scoped protocols by audience; background blur is replaced by upstream ext-background-effect-v1; wallpaper blend mode is deprecated without replacement. Influence: 1. Verify the three new XMLs parse with wayland-scanner and install via cmake. 2. Confirm window-decoration raises not_server_side_decorated without xdg-decoration SSD. 3. Confirm window-blend is fully removed; no stale references in build or READMEs. 4. Confirm deprecated personalization-manager-v1.xml still installs when INSTALL_DEPRECATED=ON. 5. Confirm dde/README.md and CMakeLists.txt file lists stay consistent. refactor: 将 personalization-manager-v1 拆分为三个协议 1. 将 personalization-manager-v1 按受众拆分为三个职责清晰的协议。 2. window-decoration(public):逐窗口 SSD 装饰定制,需先经 xdg-decoration 申请 SSD。 3. system-appearance(public):系统外观只读查询与订阅。 4. system-appearance-manager(dde):特权系统外观配置。 5. 逐窗口背景模糊改用上游 ext-background-effect-v1 协议。 6. 旧 wallpaper 混合模式废弃且无替代。 7. 原文件原样移至 deprecated/。 8. 规范生命周期:destroy 置首、enum 前置、event 后置。 9. 移除冗余 get_* 请求(push 模型)。 10. 光标:verfity 事件改为 committed 事件并新增 commit_result 枚举。 11. theme_type:移除 auto,规范化为 light=0、dark=1。 Log: 将 personalization-manager-v1 按受众拆分为三个协议,背景模糊改由上游 ext-background-effect-v1 承接,wallpaper 模式废弃且无替代。 Influence: 1. 用 wayland-scanner 校验三个新 XML 可正常解析,且 cmake 可正确安装。 2. 确认未协商 xdg-decoration SSD 时 window-decoration 报 not_server_side_decorated。 3. 确认 window-blend 已彻底移除,构建与 README 无残留引用。 4. 确认 INSTALL_DEPRECATED=ON 时旧 personalization-manager-v1.xml 仍安装。 5. 确认 dde/README.md 与 CMakeLists.txt 文件列表保持一致。
f898974 to
77d40d2
Compare
deepin pr auto reviewAI 代码审查报告
总体评价
漏洞统计
漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个 四维度评分1. 语法逻辑 ✓ — 25/25 分
2. 代码质量 ✓ — 24/25 分
3. 代码性能 ✓ — 20/20 分
4. 代码安全 ✓ — 30/30 分
详细文件分析CMakeLists.txt
dde/treeland-appearance-manager-unstable-v1.xml(新增,225 行)
public/treeland-appearance-unstable-v1.xml(新增,187 行)
public/treeland-decoration-unstable-v1.xml(新增,199 行)
文档文件(README.md / README.zh_CN.md)
改进建议
审查结论本次提交是一个高质量的重构,将单一的 personalization-manager-v1 协议按职责拆分为三个独立的协议。代码结构清晰,文档注释完整,遵循 Wayland 协议规范。Push 模型的采用和特权协议的安全声明体现了良好的设计实践。无安全漏洞,无语法逻辑错误,代码质量优秀。建议合并。 |
Split the personalization protocol into dedicated system-appearance and per-window-personalization protocols while preserving the legacy definition as deprecated.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation:
Chores:
Summary by Sourcery
Split personalization into role-specific appearance and decoration protocols while retaining the original protocol for deprecated compatibility.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation: