fix: clear stale update metrics after cancellation

Hide downloaded size, throughput, and ETA once an update download is canceled while preserving the red progress position and cancellation status.
This commit is contained in:
Sucukdeluxe
2026-08-21 00:31:27 +02:00
parent 4d3a4f1a8a
commit f05030278e
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -7540,6 +7540,7 @@ function handleUpdateProgress(data) {
_setUpdateDialogBusy(false);
const currentProgress = Number(document.getElementById('updateProgressBar')?.getAttribute('aria-valuenow')) || 0;
_setUpdateProgress(currentProgress, 'Download abgebrochen', 'aborted');
_setUpdateProgressDetails(null);
if (button) {
button.disabled = false;
button.textContent = 'Wiederholen';
+2 -2
View File
@@ -2494,8 +2494,8 @@ setTimeout(async () => {
check('Update download progress is green, wide, and places its status below the line', busyUpdateState.progressState === 'downloading' && busyUpdateState.progressColor === 'rgb(117, 211, 155)' && busyUpdateState.progressTrackWidth >= 390 && busyUpdateState.progressTextTop >= busyUpdateState.progressTrackBottom);
check('Busy update preserves the available version subtitle while progress stays below the bar', busyUpdateState.messageHidden === false && busyUpdateState.messageText === 'Update v9.9.9 verfügbar');
const updateErrorRecovery = await wc.executeJavaScript('handleUpdateProgress({ stage: "aborted", error: "Update abgebrochen" }); (() => { const bar = document.getElementById("updateProgressBar"); const state = [bar.style.width, bar.dataset.state, getComputedStyle(bar).backgroundColor, document.getElementById("updateMessage").hidden, document.getElementById("updateMessage").textContent].join("|"); document.getElementById("dismissUpdateBtn").click(); return state + "|" + document.getElementById("updateBanner").style.display + "|" + document.getElementById("updateCloseBtn").disabled + "|" + document.getElementById("dismissUpdateBtn").disabled + "|" + document.getElementById("headerUpdateBtn").hidden; })()');
check('Canceled updates preserve the version subtitle, show one red status, and restore close actions', updateErrorRecovery === '50%|aborted|rgb(255, 133, 140)|false|Update v9.9.9 verfügbar|none|false|false|false');
const updateErrorRecovery = await wc.executeJavaScript('handleUpdateProgress({ stage: "aborted", error: "Update abgebrochen" }); (() => { const bar = document.getElementById("updateProgressBar"); const details = document.getElementById("updateProgressDetails"); const state = [bar.style.width, bar.dataset.state, getComputedStyle(bar).backgroundColor, document.getElementById("updateMessage").hidden, document.getElementById("updateMessage").textContent, details.hidden, details.textContent].join("|"); document.getElementById("dismissUpdateBtn").click(); return state + "|" + document.getElementById("updateBanner").style.display + "|" + document.getElementById("updateCloseBtn").disabled + "|" + document.getElementById("dismissUpdateBtn").disabled + "|" + document.getElementById("headerUpdateBtn").hidden; })()');
check('Canceled updates hide stale metrics, preserve the version subtitle, and show one red status', updateErrorRecovery === '50%|aborted|rgb(255, 133, 140)|false|Update v9.9.9 verfügbar|true||none|false|false|false');
const initialInstallUpdateHandler = initialIpcHandlers.get('app:install-update');
const initialUpdateQueueHandler = initialIpcHandlers.get('save-pending-queue');