Skip to content

Conversation

@YyZz-wy
Copy link
Collaborator

@YyZz-wy YyZz-wy commented Dec 17, 2025

1、修复错误提示页面消息显示为空问题。
2、修复导出失败时页面回退逻辑。
3、修复导出页面多次打开后无法打开问题。

YyZz-wy and others added 30 commits July 23, 2025 15:47
…ects installation paths and improve path sorting
Copilot AI review requested due to automatic review settings December 17, 2025 09:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes several issues related to error message display and export window management. The changes address problems where error messages were showing as empty, export failure page navigation was incorrect, and the export panel couldn't be reopened after multiple uses.

Key Changes:

  • Enhanced error message display logic to fallback to alert info data when primary error message is empty
  • Added proper cleanup via onWindowClosing() calls on error paths in ExportWindow::init()
  • Implemented cancelExport signal handling to properly close windows when exports are cancelled by users
  • Refactored event loop management by replacing runEventLoopIfNeeded() with direct app->exec() calls

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
exporter/src/ui/exportPanel/CompositionsModel.h Added cancelExport signal for handling user-initiated export cancellations
exporter/src/ui/exportPanel/CompositionsModel.cpp Modified export loop to detect cancellation and emit cancelExport signal
exporter/src/ui/export/ExportWindow.cpp Added onWindowClosing() calls to properly cleanup when initialization fails
exporter/src/ui/WindowManager.cpp Simplified event loop management by removing runEventLoopIfNeeded() and calling exec() directly
exporter/src/export/PAGExport.h Added canceled flag to track when exports are cancelled by user
exporter/src/export/PAGExport.cpp Set canceled flag when user dismisses alert dialogs
exporter/assets/qml/PAGListView.qml Connected ErrorTextArea targetListView property to enable proper scrolling
exporter/assets/qml/ExportCompositionsProgress.qml Added Connections to handle cancelExport signal and close window
exporter/assets/qml/ErrorTextArea.qml Made targetListView property configurable with null safety checks
exporter/assets/qml/AlertWarning.qml Simplified button click handlers by removing unnecessary model checks
exporter/assets/qml/AlertError.qml Enhanced error message display with fallback logic and reactive updates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +59 to +67
Connections {
target: alertInfoModel
function onErrorMessageChanged() {
mainWindow.errorMessage = alertInfoModel ? alertInfoModel.errorMessage : ""
}
function onAlertInfoChanged() {
mainWindow.errorMessage = alertInfoModel ? alertInfoModel.errorMessage : ""
}
}
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The Connections target is set to alertInfoModel, but there's no null check. If alertInfoModel is null or undefined, these signal handlers will fail silently or cause errors. Consider adding an enabled property or checking if the target exists before attempting to connect.

Copilot uses AI. Check for mistakes.
Comment on lines +136 to +141
Connections {
target: exportCompositionsWindow
onCancelExport: {
window.close();
}
}
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

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

The Connections target is set to exportCompositionsWindow without a null check. If exportCompositionsWindow is null (which it can be according to line 131's check), the signal connection will fail. Consider adding an enabled property that checks if the target exists, or use the function syntax with null checking inside the handler.

Copilot uses AI. Check for mistakes.
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.27%. Comparing base (ac12903) to head (e75c600).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3163      +/-   ##
==========================================
+ Coverage   77.26%   77.27%   +0.01%     
==========================================
  Files         413      413              
  Lines       21997    21997              
  Branches     6282     6282              
==========================================
+ Hits        16995    16998       +3     
  Misses       3798     3798              
+ Partials     1204     1201       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shlzxjp shlzxjp merged commit f51582c into main Dec 17, 2025
15 checks passed
@shlzxjp shlzxjp deleted the feature/codywwang_installer branch December 17, 2025 11:02
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.

5 participants