Skip to content

sync: from linuxdeepin/dde-session-shell - #534

Merged
xionglinlin merged 1 commit into
masterfrom
sync-pr-86-nosync
Sep 9, 2026
Merged

sync: from linuxdeepin/dde-session-shell#534
xionglinlin merged 1 commit into
masterfrom
sync-pr-86-nosync

Conversation

@deepin-ci-robot

@deepin-ci-robot deepin-ci-robot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#86

Summary by Sourcery

Support configurable system version text on the login and lock screens while preserving the default display when no override is provided.

New Features:

  • Allow the displayed system version text to be customized through configuration, with automatic fallback to the default system version.

Enhancements:

  • Update the login and lock screen configuration defaults to support the customizable version text setting.

Tests:

  • Add coverage for custom version text, fallback behavior, and dynamic configuration updates.

Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#86
@sourcery-ai

sourcery-ai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Reviewer's Guide

Synchronizes configuration profiles and extends the logo widget to support a runtime-configurable system-version label, preserving the existing detected-version fallback and adding focused unit tests for the new behavior.

Sequence diagram for runtime-configurable system version text

sequenceDiagram
    participant DConfigHelper
    participant LogoWidget
    participant VersionLabel

    DConfigHelper->>LogoWidget: getConfig(SYSTEM_VERSION_TEXT, "")
    LogoWidget->>LogoWidget: updateVersionText(customText)
    alt customText is empty
        LogoWidget->>LogoWidget: getVersion()
        LogoWidget->>VersionLabel: setText(detectedVersion)
    else customText is configured
        LogoWidget->>VersionLabel: setText(customText)
    end
    DConfigHelper-->>LogoWidget: SYSTEM_VERSION_TEXT change
    LogoWidget->>LogoWidget: updateVersionText(value.toString())
    LogoWidget->>VersionLabel: setText(configuredOrDetectedVersion)
Loading

File-Level Changes

Change Details Files
Add configurable system-version text with fallback to the detected system version.
  • Introduce the systemVersionText DConfig key alongside existing visibility configuration.
  • Initialize and refresh the logo version label from the custom text, falling back to getVersion() when empty.
  • Bind configuration changes so custom text updates take effect at runtime.
  • Add unit coverage for custom text, fallback behavior, and DConfig callbacks.
src/global_util/constants.h
src/widgets/logowidget.cpp
src/widgets/logowidget.h
tests/dde-lock/ut_logowidget.cpp
Update DConfig profiles to include the synchronized configuration entries.
  • Add or extend greeter and lock configuration definitions, including snipe variants, for the synchronized settings.
configs/org.deepin.dde.lightdm-deepin-greeter.json
configs/org.deepin.dde.lock.json
configs/snipe/org.deepin.dde.lightdm-deepin-greeter.json
configs/snipe/org.deepin.dde.lock.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

@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 ✨

@deepin-ci-robot

Copy link
Copy Markdown
Contributor Author

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 98 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 优秀
评分详情 代码实现了一个自定义系统版本信息显示功能,允许通过 DConfig 配置自定义版本文本,为空时回退到系统默认版本号。代码结构清晰,遵循现有模式,安全无漏洞,性能良好。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 语法正确,逻辑清晰,无编译错误,边界处理完善


2. 代码质量 ✅

评价: 优秀 ✅ 通过

潜在问题:

  1. src/widgets/logowidget.cpp:116 - updateVersionText() 方法缺少文档注释(@brief),与同类方法 updateLocale() 不一致,建议添加文档注释说明功能和参数

建议: 建议为 updateVersionText() 方法添加 @brief 文档注释,说明其功能和参数含义,与 updateLocale() 方法保持一致


3. 代码性能 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: 性能良好,资源使用合理,算法复杂度合理,无性能瓶颈


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: 存在0个安全漏洞,无安全风险,安全合规


💡 改进建议代码示例

// 建议为 updateVersionText 添加文档注释
/**
 * @brief LogoWidget::updateVersionText
 * 根据自定义文本更新版本显示,为空时回退到系统默认版本号
 * @param customText 自定义版本文本
 */
void LogoWidget::updateVersionText(const QString &customText)
{
    m_logoVersionLabel->setText(customText.isEmpty() ? getVersion() : customText);
}

本报告由 AI 代码审查工具自动生成

@deepin-ci-robot

Copy link
Copy Markdown
Contributor Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-ci-robot, xionglinlin

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

@xionglinlin
xionglinlin merged commit 7ba46e0 into master Sep 9, 2026
25 of 26 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.

2 participants