Repository navigation
fix: clear selection state on backup result page back - #844
Draft
pppanghu77 wants to merge 1 commit into
Draft
pppanghu77 wants to merge 1 commit into
pppanghu77 wants to merge 1 commit into
Conversation
1. Root cause: backPage() only emitted changeWidget signal to switch page, missing clearWidget signal to reset selection controls 2. Fix: add emit clearWidget before changeWidget, matching the pattern used by ErrorWidget::backPage() and two other callers 3. Impact: returning to selection page after export now clears previous file selections; no effect on other navigation paths Log: Clear previous file selections when returning to selection page Influence: 1. Test file export then back to verify selections are cleared 2. Test normal export flow still works correctly 3. Verify no regression on other page navigation paths fix: 返回选择页面时清空历史选择状态 1. 根因:backPage() 仅发射 changeWidget 信号切换页面,遗漏 clearWidget 信号清空选择控件状态 2. 方案:在 changeWidget 前添加 emit clearWidget,与 ErrorWidget::backPage() 等三处正确范式保持一致 3. 影响:导出后返回选择页面将清空历史选择,不影响其他导航路径 Log: 返回选择页面时清空历史选择状态 Influence: 1. 测试文件导出后返回,验证选择已被清空 2. 测试正常导出流程仍正常工作 3. 验证其他页面导航路径无回归 PMS: BUG-262109
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pppanghu77 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
pppanghu77
marked this pull request as draft
October 29, 2026 20:01
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe backup export result page now clears previously selected files before returning to the selection page, aligning its back-navigation behavior with the established widget pattern. Sequence diagram for clearing backup selections on back navigationsequenceDiagram
actor User
participant ResultPage as ZipFileProcessResultWidget
participant TransferHelper
participant SelectionPage
User->>ResultPage: backPage()
ResultPage->>TransferHelper: clearWidget()
TransferHelper-->>SelectionPage: Clear selected files
ResultPage->>TransferHelper: changeWidget(PageName::choosewidget)
TransferHelper-->>SelectionPage: Show selection page
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root Cause Analysis
When the user exports files and clicks "back" on the result page,
ZipFileProcessResultWidget::backPage()only emitschangeWidgetto switch pages but does not emitclearWidgetto reset the selection controls. This leaves previously selected files visible when the user returns to the selection page. The samebackPage()pattern inErrorWidgetand two other callers correctly emitsclearWidgetbeforechangeWidget, confirming the omission as the root cause.Fix
Added
emit TransferHelper::instance()->clearWidget();before the existingchangeWidgetsignal inbackPage(), matching the established pattern used byErrorWidget::backPage()and other callers in the same project.Change Safety Assessment
Code Safety
backPage()was introduced in commitf5975eeewithoutclearWidget(); this change does not revert any historical fixBusiness Impact Scope
Affects the data migration backup export flow: when users return to the selection page after completing a file backup export, their previous file selections are now cleared. No other navigation paths or business modules are affected.
Verification Suggestion
Test the file export → back navigation path to verify selections are cleared. Verify normal export flow and other page navigation paths show no regression.
根因分析
用户导出文件后点击返回时,
ZipFileProcessResultWidget::backPage()仅发射changeWidget信号切换页面,未发射clearWidget信号清空选择控件状态,导致返回选择页面时历史选择仍保留。同项目中ErrorWidget::backPage()等 3 处正确范式均在切换页面前先发射clearWidget,确认遗漏为根因。修复方案
在
backPage()的changeWidget信号前新增emit TransferHelper::instance()->clearWidget();,与同项目内 3 处正确范式保持一致。改动安全评估
代码安全评估
backPage()自引入以来从未包含clearWidget()调用,本次改动不撤销任何已有修复业务影响范围
影响数据迁移备份导出流程:用户完成文件备份导出后返回选择页面时,历史选择将被清空。其他导航路径和业务模块不受影响。
验证建议
测试文件导出后返回路径,验证选择已清空。验证正常导出流程及其他页面导航路径无回归。
Summary by Sourcery
Bug Fixes: