From 036ef743625a5b39eccbaccd113924a32f0c1335 Mon Sep 17 00:00:00 2001 From: debont80 Date: Tue, 30 Jun 2026 14:41:15 -0400 Subject: [PATCH] Fix SR8: update window title to reflect active download state The window title was always 'AeroFetch' regardless of activity, so screen readers and taskbar previews couldn't tell whether downloads were running. The taskbarProgress IPC handler (which already fires on each progress tick) now calls mainWindow.setTitle() alongside setProgressBar/setOverlayIcon: - Idle: 'AeroFetch' - Downloading: 'AeroFetch -- N downloads active' - Error: 'AeroFetch -- Error' This reuses the same overlay badge label string so the text is consistent between the taskbar tooltip and the title bar. typecheck + 242 tests green. Co-Authored-By: Claude Opus 4.8 --- CODE-AUDIT.md | 2 +- src/main/index.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index cd82910..deb9368 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -1388,7 +1388,7 @@ the end so the picture is complete. **Verified-clean first:** card/label/button - [x] **SR7 — Progress bar visibly resets mid-download.** A video+audio merge downloads as two streams, so the bar fills 0→100%, then resets to 0→100% again before muxing — looks like a glitch/restart to the user. **Fix:** weight the two phases (e.g. 0–50% / 50–100%) or show a "merging…" state. -- [ ] **SR8 — Window title never reflects state** (L108/W19): always the static "AeroFetch," so the taskbar +- [x] **SR8 — Window title never reflects state** (L108/W19): always the static "AeroFetch," so the taskbar can't show "3 downloading." A finished-feeling app updates its title/tooltip with activity. ### Wording / jargon polish diff --git a/src/main/index.ts b/src/main/index.ts index 89bfe03..dbbbf74 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -435,12 +435,13 @@ function registerIpcHandlers(): void { ipcMain.handle(IpcChannels.scheduledSyncGet, () => getScheduledSync()) ipcMain.handle(IpcChannels.scheduledSyncSet, (_e, enabled: boolean) => setScheduledSync(enabled)) - // Reflect overall queue progress on the Windows taskbar. + // Reflect overall queue progress on the Windows taskbar and window title (SR8). ipcMain.handle(IpcChannels.taskbarProgress, (_e, p: TaskbarProgress) => { if (!mainWindow || mainWindow.isDestroyed()) return if (p.mode === 'none') { mainWindow.setProgressBar(-1) mainWindow.setOverlayIcon(null, '') + mainWindow.setTitle('AeroFetch') } else { mainWindow.setProgressBar(Math.max(0, Math.min(1, p.fraction)), { mode: p.mode }) const badge = p.mode === 'error' ? getErrorBadge() : getActiveBadge() @@ -448,6 +449,7 @@ function registerIpcHandlers(): void { const label = p.mode === 'error' ? 'Download error' : `${n} download${n !== 1 ? 's' : ''} active` mainWindow.setOverlayIcon(badge, label) + mainWindow.setTitle(p.mode === 'error' ? 'AeroFetch — Error' : `AeroFetch — ${label}`) } })