Skip to content

fix: correct ddcci config structure#1141

Merged
fly602 merged 1 commit into
linuxdeepin:masterfrom
fly602:master
Jun 11, 2026
Merged

fix: correct ddcci config structure#1141
fly602 merged 1 commit into
linuxdeepin:masterfrom
fly602:master

Conversation

@fly602

@fly602 fly602 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor
  1. Moved the "global" property into the "flags" array for both supportDdcci and isBacklightHelperHold settings
  2. Removed the standalone "global": true key to comply with the correct DSG config schema
  3. This ensures the configuration is properly parsed and applied globally as intended

Log: Fixed DDC/CI brightness configuration format to ensure proper global application

Influence:

  1. Verify that DDC/CI brightness control is correctly recognized as a global setting in the system configuration
  2. Test adjusting external monitor brightness to ensure DDC/CI support is enabled as expected
  3. Check if the backlight helper process hold setting is correctly applied globally

fix: 更正ddcci配置结构

  1. 将 supportDdcci 和 isBacklightHelperHold 设置项的 global 属性移至 flags 数组中
  2. 移除了独立的 global: true 键,以符合正确的 DSG 配置架构规范
  3. 这确保了配置能被正确解析,并按预期全局生效

Log: 修复DDC/CI亮度配置格式,确保其正确全局生效

Influence:

  1. 验证 DDC/CI 亮度控制是否在系统配置中被正确识别为全局设置
  2. 测试调节外接显示器亮度,确保 DDC/CI 支持按预期启用
  3. 检查亮度调节驻留设置是否正确全局应用

PMS: BUG-363673
Change-Id: I8e0262761ba6ef16b15728877c644ef5b82c276b

Summary by Sourcery

Bug Fixes:

  • Fix misconfigured DDC/CI brightness options so supportDdcci and backlight helper hold behave as global settings as intended.

@sourcery-ai

sourcery-ai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the DDC/CI brightness DSG config so that global behavior is expressed via flags instead of a top-level global property for the relevant settings.

File-Level Changes

Change Details Files
Align DDC/CI brightness DSG config with the expected schema by expressing global scope via flags for the relevant settings.
  • Update the supportDdcci setting so that its global behavior is represented by a "global" entry in the flags array instead of a standalone global property.
  • Update the isBacklightHelperHold setting in the same way, moving the global indicator into the flags array.
  • Remove any top-level or standalone "global": true keys that no longer conform to the DSG configuration schema.
misc/dsg-configs/org.deepin.dde.daemon.brightness.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

我已仔细审查了这段JSON配置文件的差异。以下是我的分析和改进建议:

  1. 语法逻辑改进:
  • 将"global": true改为"flags": ["global"]是合理的,这符合更标准的配置格式,将配置属性归类到flags数组中
  • 两个配置项都进行了相同的修改,保持了格式一致性
  1. 代码质量改进:
  • 修改后的结构更加清晰,将所有元数据(如flags)统一放在一个字段中
  • 使用数组形式表示多个标志位,便于未来扩展(例如可能需要添加其他标志)
  1. 代码性能:
  • 此为配置文件,性能影响可忽略不计
  • 使用数组形式略微增加了内存使用,但几乎可以忽略
  1. 代码安全:
  • 配置文件本身不涉及安全问题
  • 建议确保此文件有适当的权限设置,防止未授权修改

总体评价:
这是一个合理的重构,将布尔类型的"global"字段改为数组形式的"flags"字段,提高了配置的扩展性和一致性。修改保持了配置的原有功能,同时提供了更好的结构化表示。

建议:

  1. 考虑添加注释说明flags数组中各标志的含义
  2. 如果可能,为flags定义一个枚举或常量列表,以防止无效值
  3. 确保所有使用此配置的代码都能正确解析新的格式

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

1. Move the "global" attribute from a standalone boolean key to the
"flags" array in multiple DConfig JSON files
2. Correct the schema format for global configurations in appearance,
audio, brightness, and dock modules
3. Remove redundant "global": true fields to comply with the standard
DConfig definition structure

Influence:
1. Verify that DConfig daemons read these configurations correctly as
global settings
2. Test related settings in Appearance, Audio, Brightness, and Dock
modules to ensure default values still apply correctly to all users
3. Check system logs to ensure no JSON parsing errors related to the
deprecated standalone "global" key

fix: 更正 dconfig 全局标志格式

1. 将多个 DConfig JSON 文件中的 "global" 属性从独立的布尔键移至 "flags"
数组中
2. 更正外观、音频、亮度和任务栏模块中全局配置的架构格式
3. 移除冗余的 "global": true 字段,以符合标准的 DConfig 定义结构

Influence:
1. 验证 DConfig 守护进程能否正确将这些配置读取为全局设置
2. 测试外观、音频、亮度和任务栏模块中的相关设置,确保默认值仍能正确应用
于所有用户
3. 检查系统日志,确保没有与已弃用的独立 "global" 键相关的 JSON 解析错误

Change-Id: If043473532f4b44a6e6403388f5c601d0496f78c
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, fly602

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fly602 fly602 merged commit 6a4dfa8 into linuxdeepin:master Jun 11, 2026
15 checks passed
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.

3 participants