Skip to content

fix: clear history selection on backup return - #781

Closed
Johnson-zs wants to merge 1 commit into
release/v20from
agent/pms-bug-bot/990812a8
Closed

Johnson-zs wants to merge 1 commit into
release/v20from
agent/pms-bug-bot/990812a8

Conversation

@Johnson-zs

@Johnson-zs Johnson-zs commented Aug 23, 2026 •

Copy link
Copy Markdown

fix: clear history selection on backup return

  1. Root cause: ZipFileProcessResultWidget::backPage() only emitted
    changeWidget to switch page, missing clearWidget signal to reset
    selection states, leaving history selection after returning
  2. Fix: emit TransferHelper::instance()->clearWidget() in backPage(),
    consistent with ResultDisplayWidget::nextPage() in transfer flow
  3. Impact: backup result back now clears all selection controls, no
    change to page-switch logic, no effect on transfer flow

Log: fix history selection not cleared after backup result back

Influence:

  1. Test backup complete then back to selection page, verify selections
    are cleared
  2. Test transfer flow back to selection page, verify no regression
  3. Test backup failed then back, verify selection cleared

fix: 修复导出返回选择页时历史选择未清空

  1. 根因:ZipFileProcessResultWidget::backPage() 仅发出 changeWidget
    切换页面,缺少 clearWidget 信号清空选择状态,导致返回后历史选择残留
  2. 方案:在 backPage() 中补充 emit clearWidget 信号,与传输流程
    resultdisplay.cpp 现有范式保持一致
  3. 影响:导出返回时清空各选择控件状态,不改变页面切换逻辑,不影响
    传输流程

Log: 修复导出完成返回选择页时历史选择未清空的问题

Influence:

  1. 测试导出完成后返回选择页,验证各选择项已清空
  2. 测试传输流程返回选择页,验证无回归
  3. 测试导出失败后返回,验证选择项已清空

PMS: BUG-262109

Summary by Sourcery

Bug Fixes:

  • Clear backup result selections when returning to the selection page.

1. Root cause: ZipFileProcessResultWidget::backPage() only emitted
   changeWidget to switch page, missing clearWidget signal to reset
   selection states, leaving history selection after returning
2. Fix: emit TransferHelper::instance()->clearWidget() in backPage(),
   consistent with ResultDisplayWidget::nextPage() in transfer flow
3. Impact: backup result back now clears all selection controls, no
   change to page-switch logic, no effect on transfer flow

Log: fix history selection not cleared after backup result back

Influence:
1. Test backup complete then back to selection page, verify selections
   are cleared
2. Test transfer flow back to selection page, verify no regression
3. Test backup failed then back, verify selection cleared

fix: 修复导出返回选择页时历史选择未清空

1. 根因:ZipFileProcessResultWidget::backPage() 仅发出 changeWidget
   切换页面,缺少 clearWidget 信号清空选择状态,导致返回后历史选择残留
2. 方案:在 backPage() 中补充 emit clearWidget 信号,与传输流程
   resultdisplay.cpp 现有范式保持一致
3. 影响:导出返回时清空各选择控件状态,不改变页面切换逻辑,不影响
   传输流程

Log: 修复导出完成返回选择页时历史选择未清空的问题

Influence:
1. 测试导出完成后返回选择页,验证各选择项已清空
2. 测试传输流程返回选择页,验证无回归
3. 测试导出失败后返回,验证选择项已清空

PMS: BUG-262109
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Johnson-zs

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 23, 2026

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

Reviewer's Guide

Backup result navigation now clears selection state by emitting a clearWidget signal when returning to the selection page, aligning backup behavior with the existing transfer flow pattern.

Sequence diagram for clearing backup selections on return

sequenceDiagram
    participant BackupResult as ZipFileProcessResultWidget
    participant TransferHelper
    participant ChoosePage as SelectionPage

    BackupResult->>TransferHelper: changeWidget(PageName::choosewidget)
    TransferHelper->>ChoosePage: Navigate to selection page
    BackupResult->>TransferHelper: clearWidget()
    TransferHelper->>ChoosePage: Clear selection controls
Loading

File-Level Changes

Change Details Files
Ensure backup result 'back' navigation resets selection state instead of preserving previous choices.
  • Updated ZipFileProcessResultWidget::backPage() to emit clearWidget in addition to changeWidget when navigating back to the selection page
  • Aligned backup flow behavior with ResultDisplayWidget::nextPage() pattern in the transfer flow, ensuring selection widgets are consistently cleared on page transitions
src/plugins/data-transfer/core/gui/getbackup/zipfileprocessresultwidget.cpp

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.

@Johnson-zs Johnson-zs closed this Aug 24, 2026
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