Skip to content

refactor: rename display transition config#1124

Merged
fly602 merged 1 commit into
linuxdeepin:masterfrom
fly602:master
May 25, 2026
Merged

refactor: rename display transition config#1124
fly602 merged 1 commit into
linuxdeepin:masterfrom
fly602:master

Conversation

@fly602
Copy link
Copy Markdown
Contributor

@fly602 fly602 commented May 25, 2026

  1. Rename the display configuration key from "transition-step-interval" to "transition-min-step-interval" in org.deepin.Display.json
  2. Keep the existing default value, permissions, and visibility unchanged
  3. Clarify that this setting represents the minimum interval between transition steps, improving naming accuracy and reducing ambiguity for future configuration usage and maintenance

Influence:

  1. Verify that any component reading this display configuration can resolve the renamed key correctly
  2. Test display transition behavior to confirm the configured interval still takes effect as expected
  3. Check backward compatibility or migration handling if any existing environment still depends on the old key name
  4. Validate that configuration loading does not report missing-key or invalid-schema errors

refactor: 重命名显示过渡配置项

  1. 将 org.deepin.Display.json 中的显示配置键从 "transition-step- interval" 重命名为 "transition-min-step-interval"
  2. 保持原有默认值、权限和可见性不变
  3. 通过更准确的命名明确该配置表示过渡步骤之间的最小时间间隔,减少歧义, 便于后续配置使用与维护

Influence:

  1. 验证所有读取该显示配置的组件都能正确识别重命名后的键
  2. 测试显示过渡行为,确认该时间间隔配置仍能按预期生效
  3. 检查向后兼容或迁移处理,确认现有环境若依赖旧键名时不会出现异常
  4. 验证配置加载过程不会出现缺失键或模式不匹配等错误

PMS: BUG-358023
Change-Id: I5082b93e00aca72a30cec387ffefcab0d2968fd3

Summary by Sourcery

Enhancements:

  • Rename the display transition timing key in org.deepin.Display.json to better reflect that it represents the minimum interval between transition steps without altering defaults or permissions.

1. Rename the display configuration key from "transition-step-interval"
to "transition-min-step-interval" in org.deepin.Display.json
2. Keep the existing default value, permissions, and visibility
unchanged
3. Clarify that this setting represents the minimum interval between
transition steps, improving naming accuracy and reducing ambiguity for
future configuration usage and maintenance

Influence:
1. Verify that any component reading this display configuration can
resolve the renamed key correctly
2. Test display transition behavior to confirm the configured interval
still takes effect as expected
3. Check backward compatibility or migration handling if any existing
environment still depends on the old key name
4. Validate that configuration loading does not report missing-key or
invalid-schema errors

refactor: 重命名显示过渡配置项

1. 将 org.deepin.Display.json 中的显示配置键从 "transition-step-
interval" 重命名为 "transition-min-step-interval"
2. 保持原有默认值、权限和可见性不变
3. 通过更准确的命名明确该配置表示过渡步骤之间的最小时间间隔,减少歧义,
便于后续配置使用与维护

Influence:
1. 验证所有读取该显示配置的组件都能正确识别重命名后的键
2. 测试显示过渡行为,确认该时间间隔配置仍能按预期生效
3. 检查向后兼容或迁移处理,确认现有环境若依赖旧键名时不会出现异常
4. 验证配置加载过程不会出现缺失键或模式不匹配等错误

PMS: BUG-358023
Change-Id: I5082b93e00aca72a30cec387ffefcab0d2968fd3
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 25, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Renames a display configuration key in org.deepin.Display.json to more accurately reflect that it configures the minimum interval between display transition steps, while keeping the semantics, default, and permissions unchanged.

File-Level Changes

Change Details Files
Rename the display transition interval configuration key to clarify it represents a minimum step interval while preserving its existing behavior and metadata.
  • Update the configuration key name from "transition-step-interval" to "transition-min-step-interval" in the display configuration schema
  • Ensure the default value, access permissions, and visibility attributes for the key remain unchanged after the rename
  • Align the configuration naming with its actual semantics to reduce ambiguity for future readers and maintainers
misc/dsg-configs/org.deepin.Display.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

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Since the config key is being renamed, consider either keeping a deprecated alias for transition-step-interval or adding a migration/compat layer in the config-reading code so existing installations don’t break when the new schema lands.
  • Double-check all usages of transition-step-interval across the codebase and scripts to ensure they’ve been updated consistently to transition-min-step-interval and that no hardcoded strings or defaults still refer to the old key.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since the config key is being renamed, consider either keeping a deprecated alias for `transition-step-interval` or adding a migration/compat layer in the config-reading code so existing installations don’t break when the new schema lands.
- Double-check all usages of `transition-step-interval` across the codebase and scripts to ensure they’ve been updated consistently to `transition-min-step-interval` and that no hardcoded strings or defaults still refer to the old key.

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.

@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

你好!我是CodeGeeX。我已仔细审查了你提供的 Git Diff 内容。

本次修改非常简单,仅将配置项的键名从 transition-step-interval 修改为了 transition-min-step-interval。以下是针对本次修改的详细代码审查意见:

1. 语法逻辑

  • 审查结果:通过。
  • 说明:JSON 格式正确,修改仅涉及键名,未破坏原有的数据结构(值、serial、flags、permissions、visibility 等均保持完整),不会引发 JSON 解析错误。

2. 代码质量

  • 审查结果:良好,但需注意语义准确性。
  • 说明
    • step-interval 改为 min-step-interval,语义从“过渡步长间隔”变为了“最小过渡步长间隔”。这表明开发者可能修复了之前的逻辑缺陷,将一个固定值改为了下限值,使得配置项的命名更加精准,符合其实真实的业务逻辑。
    • 建议:请确认业务逻辑是否真的从“固定间隔”变为了“最小间隔”。如果是,这是一个很好的改进;如果实际逻辑仍然是固定间隔,那么修改键名反而会引起误解。

3. 代码性能

  • 审查结果:无影响。
  • 说明:配置项键名的长度增加了 4 个字符,这在 JSON 解析和内存占用上带来的开销微乎其微,不会对性能产生任何实质性影响。

4. 代码安全

  • 审查结果:存在高风险隐患,需重点排查。
  • 说明:修改配置文件的键名属于破坏性变更。如果系统其他部分(如 C++/Qt 代码、QML、脚本等)仍在使用旧键名 transition-step-interval 来读取该配置,将会导致读取失败(通常返回空值或默认值),可能引发以下安全问题:
    • 空指针/类型错误:代码若未对读取不到配置的情况做防御性处理,可能导致程序崩溃。
    • 静默失败与不可控行为:若代码使用了其他默认值,可能导致显示过渡动画的行为异常,影响系统稳定性。

💡 综合改进建议与行动项

  1. 全局搜索与替换(必须)
    在整个代码库中全局搜索旧键名 transition-step-interval,确保所有读取该 DSG 配置的代码都已同步更新为 transition-min-step-interval

  2. 配置兼容性迁移(强烈建议)
    如果该配置文件会被部署到用户已有的系统上(即覆盖升级),用户的旧配置文件中仍然会是 transition-step-interval。如果程序直接去读新键名,会导致用户丢失原有配置。

    • 改进方案:在读取该配置的代码逻辑中增加兼容性处理:优先读取 transition-min-step-interval,如果不存在,则尝试读取旧的 transition-step-interval 并将其值作为兼容回退,甚至在必要时将旧值写入新键名中完成配置迁移。
  3. 补充文档与注释(建议)
    由于配置项的 visibility"private",说明它可能是一个内部调试/高级配置。建议在代码仓库的相关文档或 Commit Message 中记录本次重命名的原因,避免其他维护人员产生困惑。

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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 6741354 into linuxdeepin:master May 25, 2026
18 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