Conversation
Reviewer's GuideIntroduces the experimental output-mirror manager/group protocol with wl_output-based identity, push-based group enumeration, explicit lifecycle and membership semantics, while moving the old virtual-output protocol to deprecated installation and documenting the 0.7.0 migration in English and Chinese. Sequence diagram for output mirror group discovery and configurationsequenceDiagram
participant Client
participant Manager as treeland_output_mirror_manager_v1
participant Group as treeland_output_mirror_group_v1
participant Output as wl_output
Client->>Manager: bind
Manager-->>Client: group_added(id, name)
Manager-->>Group: source(output or null)
Manager-->>Group: output_added(mirror)
Client->>Manager: create_group(id, name)
Manager-->>Client: group object
Client->>Group: set_source(Output)
Group-->>Client: source(Output)
Client->>Group: add_output(Output)
Group-->>Client: output_added(Output)
State diagram for output mirror group lifecyclestateDiagram-v2
[*] --> Empty: create_group
Empty --> Configured: set_source / add_output
Configured --> Mirroring: source and mirror present
Mirroring --> Configured: remove_output
Empty --> Dissolved: dissolve
Configured --> Dissolved: dissolve
Mirroring --> Dissolved: dissolve
Dissolved --> [*]: destroy
state Configured {
[*] --> SourceOrMirrors
SourceOrMirrors --> SourceOrMirrors: set_source / add_output
SourceOrMirrors --> SourceOrMirrors: remove_output
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
[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 |
1. Introduce treeland-output-mirror-manager-unstable-v1.xml with manager/group split, wl_output object identity, explicit set_source/add_output/remove_output, and registry-pattern enumeration via group_added/group_removed events. 2. Move treeland-virtual-output-manager-v1.xml to deprecated/ unchanged; it remains installed by default for migration. 3. Register the new protocol in TREELAND_PROTOCOL_DDE_XML_FILES and the old one in TREELAND_PROTOCOL_DEPRECATED_XML_FILES. 4. Update dde README.md and README.zh_CN.md with the new protocol table row and a 0.7.0 breaking-changes subsection in both languages describing the wire-level differences. Log: Redesign the output copy/mirror protocol around wl_output object identity instead of output-name strings, with explicit source/mirror separation, registry-push enumeration, and fully specified object lifecycles; the old string-array and positional semantics are removed. Influence: 1. Verify wayland-scanner generates client/server headers and code for the new XML without errors. 2. Verify cmake configure/build/install places the new file in share/treeland-protocols and the old file still installs from deprecated/. 3. Verify dde README.md and README.zh_CN.md table rows and the 0.7.0 breaking-changes subsection are present and in sync. feat: 新增 output-mirror 协议,废弃 virtual-output-v1 1. 新增 treeland-output-mirror-manager-unstable-v1.xml,采用 manager/group 分离、wl_output 对象身份、显式 set_source/add_output/remove_output,以及通过 group_added/group_removed 事件的 registry 模式枚举。 2. 将 treeland-virtual-output-manager-v1.xml 原样移至 deprecated/,默认仍安装以供迁移。 3. 在 TREELAND_PROTOCOL_DDE_XML_FILES 注册新协议,在 TREELAND_PROTOCOL_DEPRECATED_XML_FILES 注册旧协议。 4. 更新 dde README.md 与 README.zh_CN.md 的协议表行,并在双 语 README 中新增 0.7.0 破坏性变更子节,描述线缆级差异。 Log: 围绕 wl_output 对象身份重新设计输出复制/镜像协议,显式 区分源与镜像、采用 registry 推送枚举并完整定义对象生命周期; 旧的字符串数组与位置语义已移除。 Influence: 1. 验证 wayland-scanner 对新 XML 生成 client/server 头文件与 代码无报错。 2. 验证 cmake 配置/构建/安装将新文件安装至 share/treeland-protocols,旧文件仍从 deprecated/ 安装。 3. 验证 dde README.md 与 README.zh_CN.md 表行及 0.7.0 破坏 性变更子节存在且内容同步。
1. Add treeland-output-uuid-unstable-v1.xml: stable opaque uuid identity for wl_output objects via treeland_output_uuid_manager_v1 .get_uuid; treeland_output_uuid_v1 is frozen at v1 (two independent factory ancestors). 2. Add treeland-output-uuid-head-unstable-v1.xml: companion protocol depending on wlr-output-management; its manager returns the same treeland_output_uuid_v1 object from a zwlr_output_head_v1, including disabled outputs with no live wl_output global. 3. Switch treeland-output-manager-unstable-v2.xml to uuid addressing: set_primary_output, get_picture_control, and the primary_output event take uuid strings; empty uuid means no primary output; new fatal error error.invalid_uuid for empty uuids. 4. Switch treeland-output-mirror-manager-unstable-v1.xml to uuid addressing: set_source, add_output, remove_output, source, output_added, and output_removed carry uuid strings; source event uses empty uuid instead of a null object when no source is set. 5. Update dde README.md and README.zh_CN.md with the two new protocol table rows and the 0.7.0 breaking-changes entries covering the new uuid protocols, the output-manager-v2 wire change, and the mirror protocol redesign. Log: Output identity across treeland output protocols is now based on stable opaque uuid strings obtained from the new treeland-output-uuid protocols, replacing both output-name strings and wl_output object references; uuids are unique among connected outputs, stable across sessions and reconnections, and shared between the wl_output and wlr-head factories. Influence: 1. Verify wayland-scanner generates client/server headers and code for all four output protocol XMLs without errors. 2. Verify cmake configure/build/install registers and installs both new uuid XML files and the modified output-manager-v2 and mirror XMLs. 3. Verify the treeland-output-uuid-head client code links against treeland_output_uuid_v1_interface provided by the treeland-output-uuid generated code. 4. Verify dde README.md and README.zh_CN.md contain matching protocol tables and synchronized 0.7.0 breaking-changes sections. feat: 新增 output-uuid 协议,输出改为 uuid 寻址 1. 新增 treeland-output-uuid-unstable-v1.xml:通过 treeland_output_uuid_manager_v1.get_uuid 为 wl_output 提供稳定 不透明 uuid 身份;treeland_output_uuid_v1 冻结于 v1(两个独立 工厂祖先)。 2. 新增 treeland-output-uuid-head-unstable-v1.xml:依赖 wlr-output-management 的配套协议;其管理器从 zwlr_output_head_v1 返回同一个 treeland_output_uuid_v1 对象, 涵盖无存活 wl_output 全局的禁用输出。 3. treeland-output-manager-unstable-v2.xml 改为 uuid 寻址: set_primary_output、get_picture_control 与 primary_output 事件 改用 uuid 字符串;空 uuid 表示无主屏;新增致命错误 error.invalid_uuid(空 uuid)。 4. treeland-output-mirror-manager-unstable-v1.xml 改为 uuid 寻址: set_source、add_output、remove_output、source、output_added 与 output_removed 携带 uuid 字符串;source 事件在无源时以空 uuid 替代 null 对象。 5. 更新 dde README.md 与 README.zh_CN.md:新增两个协议表行,并在 0.7.0 破坏性变更中覆盖新 uuid 协议、output-manager-v2 线缆变 更与 mirror 协议重设计。 Log: treeland 输出协议体系的输出身份现基于新 treeland-output-uuid 协议提供的稳定不透明 uuid 字符串,同时替代输出名字符串与 wl_output 对象引用;uuid 在已连接输出间唯一、跨会话与重插稳定, 并由 wl_output 与 wlr head 两个工厂共享。 Influence: 1. 验证 wayland-scanner 对全部四个输出协议 XML 生成 client/server 头文件与代码无报错。 2. 验证 cmake 配置/构建/安装注册并安装两个新 uuid XML 及修改后的 output-manager-v2 与 mirror XML。 3. 验证 treeland-output-uuid-head 客户端代码能链接由 treeland-output-uuid 生成代码提供的 treeland_output_uuid_v1_interface。 4. 验证 dde README.md 与 README.zh_CN.md 协议表一致且 0.7.0 破坏 性变更内容同步。
3dfa329 to
f5253f7
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The unchanged v2 wire identity, undefined unknown-UUID initialization, stale package version, and incorrect documented API name must be addressed.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds UUID-based output identity and mirroring while retaining the legacy virtual-output protocol for migration.
Changes:
- Adds UUID and output-mirror protocols.
- Migrates output-manager v2 from
wl_outputobjects to UUIDs. - Updates installation and bilingual migration documentation.
File summaries
| File | Description |
|---|---|
CMakeLists.txt |
Registers new and deprecated protocols. |
deprecated/treeland-virtual-output-manager-v1.xml |
Preserves the legacy protocol. |
dde/treeland-output-uuid-unstable-v1.xml |
Defines UUID lookup for wl_output. |
dde/treeland-output-uuid-head-unstable-v1.xml |
Adds UUID lookup for wlr heads. |
dde/treeland-output-mirror-manager-unstable-v1.xml |
Defines UUID-based mirror groups. |
dde/treeland-output-manager-unstable-v2.xml |
Replaces object arguments with UUID strings. |
dde/README.md |
Documents protocols and migration. |
dde/README.zh_CN.md |
Adds synchronized Chinese documentation. |
Review details
- Files reviewed: 7/8 changed files
- Comments generated: 5
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例// 暂无代码示例本报告由 AI 代码审查工具自动生成 |
1. Slim verbose descriptions across output-uuid, output-uuid-head, and output-mirror-manager XMLs; remove cross-layer duplication while keeping all normative content (RFC 2119, error codes, lifecycles, successor rules, frozen rationale). 2. Fix get_picture_control contract contradiction: an unknown uuid no longer creates a picture-control object with no source for initial events; it is now a fatal error.unknown_output at creation, so the unconditional color_temperature/brightness initial-state contract holds. 3. Split mirror group errors by severity: invalid_output, duplicate_output, output_in_use, and not_in_group become non-fatal failures reported via the new operation_failed event (code + uuid); only already_dissolved remains a fatal protocol error. Transient output state no longer terminates the client connection. 4. Add source argument to create_group so a group is created with its source already set; observers never see an empty-source group. A non-empty source with no connected enabled output is a fatal error.invalid_source at creation. 5. Fix README: the two uuid managers both use the request name get_uuid; there is no get_uuid_for_head. Consolidate the output-manager breaking changes into 0.7.0 (v2 was unreleased) and drop the new uuid protocols from the breaking-changes list. Log: No user-facing changes Influence: 1. Verify wayland-scanner generates client/server headers and code for all four output protocol XMLs without errors. 2. Verify get_picture_control with an unknown uuid is rejected at creation and no picture-control object is created. 3. Verify an add_output failing due to output unplug emits operation_failed without terminating the connection. 4. Verify create_group with a source uuid creates a group whose initial source event carries that uuid. 5. Verify dde README.md and README.zh_CN.md contain matching 0.7.0 breaking-changes sections and no get_uuid_for_head reference. refactor: 收紧输出协议语义与文档 1. 精简 output-uuid、output-uuid-head 与 output-mirror-manager XML 的冗余描述;去除跨层级重复,同时保留全部规范内容 (RFC 2119、错误码、生命周期、后继规则、frozen 理由)。 2. 修正 get_picture_control 契约矛盾:未知 uuid 不再创建无源 可供初始事件的 picture-control 对象;现为创建时致命错误 error.unknown_output,故无条件发送 color_temperature/ brightness 初始状态的契约成立。 3. 按严重程度划分 mirror group 错误:invalid_output、 duplicate_output、output_in_use、not_in_group 改为通过新增 operation_failed 事件(code + uuid)报告的非致命失败;仅 already_dissolved 仍为致命协议错误。瞬态输出状态不再终止 客户端连接。 4. 为 create_group 新增 source 参数,使组创建时即已设置源; 观察者不会看到空源组。不标识已连接已启用输出的非空源在创建 时为致命错误 error.invalid_source。 5. 修正 README:两个 uuid manager 都使用请求名 get_uuid;不存 在 get_uuid_for_head。将 output-manager 破坏性变更合并至 0.7.0(v2 未发布),并将新 uuid 协议移出破坏性变更列表。 Log: 无用户可见变化 Influence: 1. 验证 wayland-scanner 对全部四个输出协议 XML 生成 client/ server 头文件与代码无报错。 2. 验证 get_picture_control 传未知 uuid 在创建时被拒绝且不创建 picture-control 对象。 3. 验证 add_output 因输出拔出失败时发送 operation_failed 且不 终止连接。 4. 验证 create_group 带 source uuid 创建的组其初始 source 事件 携带该 uuid。 5. 验证 dde README.md 与 README.zh_CN.md 的 0.7.0 破坏性变更 内容一致且无 get_uuid_for_head 引用。
e4b1a96 to
dc7a7c7
Compare
1. Rename file/protocol/interfaces: treeland_output_mirror_* to treeland_output_group_manager_v1 and treeland_output_group_v1 2. Group names are now compositor-assigned; add name event on the group and get_group request on the manager; drop client-supplied name argument and the invalid_name/name_exists manager errors 3. Replace output_added/output_removed with a single full-list outputs event carrying count plus concatenated fixed-length uuids 4. Split configured vs effective state: unplugged or disabled outputs remain configured and auto-resume on return, no auto source promotion, and the compositor persists groups across restarts 5. Document wl_output visibility: only the source exposes wl_output, mirror uuids come from treeland-output-uuid-head-unstable-v1; add groups_done event terminating the bind-time group_added dump 6. Declare fixed-length uuids in treeland-output-uuid(-head) so the outputs array can be parsed without separators Log: Redesigned the unreleased output group protocol XML; no released consumers are affected Influence: 1. Verify xmllint and check-protocol-xml.sh pass on all changed XMLs 2. Verify wayland-scanner generates valid headers for the renamed interfaces and the new name/outputs/groups_done events 3. Verify CMake installs the renamed XML via TREELAND_PROTOCOL_DDE_XML_FILES 4. Track Treeland to rebind the renamed global and implement the new request/event set before any consumer ships refactor: 重构输出镜像协议为输出分组管理协议 1. 重命名文件/协议/接口:treeland_output_mirror_* 改为 treeland_output_group_manager_v1 与 treeland_output_group_v1 2. 组名改由合成器分配;组对象新增 name 事件,manager 新增 get_group 请求;移除客户端传入的 name 参数及相关错误码 3. output_added/output_removed 合并为单个全量 outputs 事件, 携带数量与定长 uuid 拼接数组 4. 区分配置态与运行时有效态:拔出/禁用的输出保留配置并自动 恢复,不再自动提升源,合成器跨重启持久化组配置 5. 说明 wl_output 可见性:仅 source 暴露 wl_output,镜像 uuid 需经 treeland-output-uuid-head 获取;新增 groups_done 事件 标记 bind 时 group_added 初始推送结束 6. treeland-output-uuid(-head) 声明 uuid 定长,outputs 数组可 无分隔符解析 Log: 重新设计尚未发布的输出分组协议 XML,无已发布消费者受影响 Influence: 1. 验证所有变更 XML 通过 xmllint 与 check-protocol-xml.sh 2. 验证 wayland-scanner 能为重命名接口及新增事件生成有效头文件 3. 验证 CMake 经 TREELAND_PROTOCOL_DDE_XML_FILES 安装重命名后的 XML 4. 跟进 Treeland 侧重新绑定全局对象并实现新请求/事件集
Log: Redesign the output copy/mirror protocol around wl_output object identity instead of output-name strings, with explicit source/mirror separation, registry-push enumeration, and fully specified object lifecycles; the old string-array and positional semantics are removed.
Influence:
feat: 新增 output-mirror 协议,废弃 virtual-output-v1
Log: 围绕 wl_output 对象身份重新设计输出复制/镜像协议,显式
区分源与镜像、采用 registry 推送枚举并完整定义对象生命周期;
旧的字符串数组与位置语义已移除。
Influence:
Summary by Sourcery
Adopt stable UUID-based output identity and replace the legacy virtual-output interface with an explicit, registry-driven output mirroring protocol while preserving the old protocol for migration.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation: