Compare commits

...

2 Commits

Author SHA1 Message Date
xRangerDE
c845be64cf release: 4.6.88 auto-updater lifecycle events go through appendDebugLog
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 06:21:42 +02:00
xRangerDE
a7f16d8cf8 observability: auto-updater lifecycle events go through appendDebugLog, not console.log
Four autoUpdater event handlers (checking-for-update, update-available, update-not-available, update-downloaded) were logging via raw console.log while the sibling 'error' handler already used appendDebugLog. Two consequences:

1. In a packaged build the user has no visible record of the update lifecycle — console.log streams to stderr which is invisible without DevTools. appendDebugLog writes to the timestamped debug log file that the user can inspect via the Live Debug-Log card in Settings.

2. Inconsistent — the existing 'auto-updater-error' tag in line 6479 was the only update-related event reaching the debug log. New tags ('auto-updater-checking', 'auto-updater-update-available', 'auto-updater-update-not-available', 'auto-updater-update-downloaded') give the full lifecycle a coherent grep-friendly prefix in the log.

The version info that was being printed inline ("Update available: 4.7.0") now lives in the structured details payload instead of a free-form message — easier to parse mechanically and matches the rest of the codebase's debug-log conventions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 06:21:35 +02:00
3 changed files with 7 additions and 7 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "twitch-vod-manager", "name": "twitch-vod-manager",
"version": "4.6.87", "version": "4.6.88",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "twitch-vod-manager", "name": "twitch-vod-manager",
"version": "4.6.87", "version": "4.6.88",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"axios": "^1.6.0", "axios": "^1.6.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "twitch-vod-manager", "name": "twitch-vod-manager",
"version": "4.6.87", "version": "4.6.88",
"description": "Twitch VOD Manager - Download Twitch VODs easily", "description": "Twitch VOD Manager - Download Twitch VODs easily",
"main": "dist/main.js", "main": "dist/main.js",
"author": "xRangerDE", "author": "xRangerDE",

View File

@ -6392,7 +6392,7 @@ function setupAutoUpdater() {
autoUpdater.autoRunAppAfterInstall = true; autoUpdater.autoRunAppAfterInstall = true;
autoUpdater.on('checking-for-update', () => { autoUpdater.on('checking-for-update', () => {
console.log('Checking for updates...'); appendDebugLog('auto-updater-checking');
mainWindow?.webContents.send('update-checking'); mainWindow?.webContents.send('update-checking');
}); });
@ -6416,7 +6416,7 @@ function setupAutoUpdater() {
compareUpdateVersions(downloadedUpdateVersion, incomingVersion) === 0 compareUpdateVersions(downloadedUpdateVersion, incomingVersion) === 0
); );
console.log('Update available:', displayVersion); appendDebugLog('auto-updater-update-available', { version: displayVersion });
if (!hasAlreadyDownloadedThisVersion) { if (!hasAlreadyDownloadedThisVersion) {
autoUpdateReadyToInstall = false; autoUpdateReadyToInstall = false;
} }
@ -6440,7 +6440,7 @@ function setupAutoUpdater() {
}); });
autoUpdater.on('update-not-available', () => { autoUpdater.on('update-not-available', () => {
console.log('No updates available'); appendDebugLog('auto-updater-update-not-available');
mainWindow?.webContents.send('update-not-available'); mainWindow?.webContents.send('update-not-available');
}); });
@ -6460,7 +6460,7 @@ function setupAutoUpdater() {
autoUpdater.on('update-downloaded', (info) => { autoUpdater.on('update-downloaded', (info) => {
const downloadedVersion = normalizeUpdateVersion(info.version) || info.version; const downloadedVersion = normalizeUpdateVersion(info.version) || info.version;
console.log('Update downloaded:', downloadedVersion); appendDebugLog('auto-updater-update-downloaded', { version: downloadedVersion });
autoUpdateReadyToInstall = true; autoUpdateReadyToInstall = true;
autoUpdateDownloadInProgress = false; autoUpdateDownloadInProgress = false;
downloadedUpdateVersion = downloadedVersion; downloadedUpdateVersion = downloadedVersion;