Skip to content

feat: show welcome page based on major upgrade status - #337

Open
xionglinlin wants to merge 1 commit into
linuxdeepin:masterfrom
xionglinlin:feat/showWelcome
Open

feat: show welcome page based on major upgrade status#337
xionglinlin wants to merge 1 commit into
linuxdeepin:masterfrom
xionglinlin:feat/showWelcome

Conversation

@xionglinlin

@xionglinlin xionglinlin commented Aug 26, 2026

Copy link
Copy Markdown
Contributor
  1. Add DConfig option "showWelcomePage" to control welcome page display after updates
  2. Allow user to disable welcome page entirely via configuration
  3. For minor updates (non-major upgrades), skip welcome page and directly enter desktop
  4. Parse "MajorUpgrade" option from lastore-daemon to determine upgrade type
  5. Add ShowWelcomePage DConfig JSON configuration file with default true
  6. Install the new DConfig file to proper system directory
  7. Add majorUpgrade state tracking in UpdateModel
  8. Log skip behavior for debugging purposes

Log: 更新完成后根据升级类型和配置控制欢迎界面显示

Influence:

  1. Verify welcome page shows after major version upgrades when config is enabled
  2. Verify welcome page is skipped after minor version updates
  3. Test with showWelcomePage set to false to ensure welcome page never shows
  4. Test with showWelcomePage set to true to confirm default behavior
  5. Verify MajorUpgrade option parsed correctly from lastore-daemon
  6. Test config file installation and DConfig service pickup
  7. Confirm logs correctly record why welcome page was skipped

feat: 根据大版本升级状态显示欢迎界面

  1. 添加 DConfig 配置项 "showWelcomePage" 用于控制更新后的欢迎界面显示
  2. 允许用户通过配置完全关闭欢迎界面
  3. 小版本更新(非大版本)跳过欢迎界面,直接进入桌面
  4. 从 lastore-daemon 解析 "MajorUpgrade" 选项以确定升级类型
  5. 添加 ShowWelcomePage DConfig JSON 配置文件,默认值为 true
  6. 将新的 DConfig 文件安装到系统目录
  7. 在 UpdateModel 中添加 majorUpgrade 状态跟踪
  8. 记录跳过行为日志以便调试

Log: 更新完成后根据升级类型和配置控制欢迎界面显示

Influence:

  1. 验证大版本升级后配置开启时显示欢迎界面
  2. 验证小版本更新后跳过欢迎界面
  3. 测试将 showWelcomePage 设为 false 时任何更新都不显示欢迎界面
  4. 测试 showWelcomePage 设为 true 时保持默认行为
  5. 验证从 lastore-daemon 正确解析 MajorUpgrade 选项
  6. 测试配置文件安装及 DConfig 服务加载
  7. 确认日志正确记录跳过欢迎界面的原因

PMS: TASK-394209
Change-Id: I5cf78da22c11a9847a1881e1bdf5021f078e79a6

Summary by Sourcery

Control post-update welcome page display based on the upgrade type and user configuration.

New Features:

  • Control whether the post-update welcome page is shown through a DConfig setting, enabled by default.
  • Show the welcome page only after major version upgrades and skip it for minor updates.

Enhancements:

  • Track and log the upgrade classification reported by lastore-daemon to determine welcome page behavior.

Build:

  • Install the new DConfig configuration file with the project.

1. Add DConfig option "showWelcomePage" to control welcome page display
after updates
2. Allow user to disable welcome page entirely via configuration
3. For minor updates (non-major upgrades), skip welcome page and
directly enter desktop
4. Parse "MajorUpgrade" option from lastore-daemon to determine upgrade
type
5. Add ShowWelcomePage DConfig JSON configuration file with default true
6. Install the new DConfig file to proper system directory
7. Add majorUpgrade state tracking in UpdateModel
8. Log skip behavior for debugging purposes

Log: 更新完成后根据升级类型和配置控制欢迎界面显示

Influence:
1. Verify welcome page shows after major version upgrades when config
is enabled
2. Verify welcome page is skipped after minor version updates
3. Test with showWelcomePage set to false to ensure welcome page never
shows
4. Test with showWelcomePage set to true to confirm default behavior
5. Verify MajorUpgrade option parsed correctly from lastore-daemon
6. Test config file installation and DConfig service pickup
7. Confirm logs correctly record why welcome page was skipped

feat: 根据大版本升级状态显示欢迎界面

1. 添加 DConfig 配置项 "showWelcomePage" 用于控制更新后的欢迎界面显示
2. 允许用户通过配置完全关闭欢迎界面
3. 小版本更新(非大版本)跳过欢迎界面,直接进入桌面
4. 从 lastore-daemon 解析 "MajorUpgrade" 选项以确定升级类型
5. 添加 ShowWelcomePage DConfig JSON 配置文件,默认值为 true
6. 将新的 DConfig 文件安装到系统目录
7. 在 UpdateModel 中添加 majorUpgrade 状态跟踪
8. 记录跳过行为日志以便调试

Log: 更新完成后根据升级类型和配置控制欢迎界面显示

Influence:
1. 验证大版本升级后配置开启时显示欢迎界面
2. 验证小版本更新后跳过欢迎界面
3. 测试将 showWelcomePage 设为 false 时任何更新都不显示欢迎界面
4. 测试 showWelcomePage 设为 true 时保持默认行为
5. 验证从 lastore-daemon 正确解析 MajorUpgrade 选项
6. 测试配置文件安装及 DConfig 服务加载
7. 确认日志正确记录跳过欢迎界面的原因

PMS: TASK-394209
Change-Id: I5cf78da22c11a9847a1881e1bdf5021f078e79a6
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 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

@sourcery-ai

sourcery-ai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Reviewer's Guide

The update flow now shows the welcome page only for major upgrades when the new showWelcomePage DConfig option is enabled; minor upgrades and disabled configuration exit directly to the desktop, while MajorUpgrade is parsed from lastore-daemon and tracked in UpdateModel.

Sequence diagram for conditional welcome page display after updates

sequenceDiagram
    participant Lastore as lastore-daemon
    participant Worker as UpdateWorker
    participant Model as UpdateModel
    participant Check as CheckSystemWidget
    participant Config as DConfig
    participant Desktop as Desktop

    Lastore->>Worker: getUpdateOption()
    Worker->>Worker: parse MajorUpgrade
    Worker->>Model: setMajorUpgrade(majorUpgrade)
    Check->>Config: getConfig(showWelcomePage)
    Check->>Model: majorUpgrade()
    alt showWelcomePage is true and majorUpgrade is true
        Check->>Check: create SuccessFrame
    else configuration disabled or minor upgrade
        Check->>Check: qApp->exit()
        Check->>Desktop: enter desktop
    end
Loading

File-Level Changes

Change Details Files
Gate the post-update welcome page on both upgrade type and a DConfig setting.
  • Read showWelcomePage with a default of true.
  • Exit directly to the desktop for minor upgrades or when the setting is disabled.
  • Log the configuration and upgrade state whenever the page is skipped.
src/dde-update/checksystemwidget.cpp
src/dde-update/misc/org.deepin.dde.update.json
Track and propagate whether the completed update is a major upgrade.
  • Add majorUpgrade state and accessors to UpdateModel.
  • Parse the MajorUpgrade boolean from the lastore-daemon options and store it in UpdateModel.
  • Log the parsed upgrade classification.
src/dde-update/updatemodel.h
src/dde-update/updateworker.cpp
Install the new welcome-page configuration through the build system.
  • Install the DConfig JSON file under the org.deepin.dde.update configuration directory.
  • Provide the configuration with showWelcomePage enabled by default.
src/dde-update/CMakeLists.txt
src/dde-update/misc/org.deepin.dde.update.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 ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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