Skip to content

fix(desktop): improve auto-updater diagnostics and bump deps#1291

Merged
Kitenite merged 2 commits into
mainfrom
kitenite/debug-version-autodupdate
Feb 8, 2026
Merged

fix(desktop): improve auto-updater diagnostics and bump deps#1291
Kitenite merged 2 commits into
mainfrom
kitenite/debug-version-autodupdate

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 8, 2026

Summary

  • Bump Electron 40.0.040.2.1 — picks up Squirrel.Mac fixes for stale staged update cleanup (electron#49365) and zip extraction crash handling (electron#47271)
  • Bump electron-updater 6.7.36.8.2
  • Disable differential downloads — the generic provider with GitHub releases can't resolve old blockmap files (they live in a different release, not at /releases/latest/)
  • Add detailed diagnostic logging to auto-updater: current version, feed URL, version transitions, download progress in MB, and resolved file URLs

Context

Some users sporadically get stuck on old versions and auto-update never kicks in. The enhanced logging will help diagnose whether the issue is in the check/download phase or the Squirrel/ShipIt install phase. The Electron bump includes upstream fixes for macOS update reliability.

Test plan

  • Verify app launches and auto-updater initializes with the new log line showing version, channel, and feed URL
  • Trigger a manual update check (menu → Check for Updates) and confirm detailed logs appear
  • Confirm typecheck passes

Summary by CodeRabbit

  • Chores

    • Updated Electron framework to version 40.2.1
  • Bug Fixes

    • Enhanced the software update process with improved error handling and real-time progress tracking during downloads.

- Bump Electron 40.0.0 → 40.2.1 (includes Squirrel.Mac fixes for
  stale staged update cleanup and zip extraction crash handling)
- Bump electron-updater 6.7.3 → 6.8.2
- Disable differential downloads (incompatible with generic GitHub
  provider — old blockmap files don't exist at /releases/latest/)
- Add detailed diagnostic logging: version info, feed URL, download
  progress with MB counts, and file URLs to help debug sporadic
  update failures
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

This PR upgrades the Electron version from 40.0.0 to 40.2.1 and enhances the auto-updater module with disabled differential downloads and enriched logging throughout the update lifecycle to provide better visibility into version and download details.

Changes

Cohort / File(s) Summary
Electron Dependency Update
apps/desktop/package.json
Bumped Electron devDependency from 40.0.0 to 40.2.1.
Auto-Updater Enhancements
apps/desktop/src/main/lib/auto-updater.ts
Set disableDifferentialDownload = true and augmented logging across all update events (initialization, checking, available, progress, downloaded, error) to include version information, file URLs, and download progress in MB.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 Electrons bounce to version new,
Differential downloads bid adieu,
With logs so rich, we'll see it all—
Updates dance through the desktop hall!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: fixing auto-updater diagnostics and bumping dependencies.
Description check ✅ Passed The description covers the key aspects with a clear summary, context, and test plan, though it does not follow the template structure provided.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kitenite/debug-version-autodupdate

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
apps/desktop/src/main/lib/auto-updater.ts (2)

243-248: info.files may be undefined, resulting in "files: undefined" in the log.

When info.files is nullish the optional chain returns undefined, which the template literal stringifies as the literal text "undefined". Consider a fallback for cleaner logs.

✏️ Suggested tweak
-		`[auto-updater] Update available: ${app.getVersion()} → ${info.version} (files: ${info.files?.map((f: { url: string }) => f.url).join(", ")})`,
+		`[auto-updater] Update available: ${app.getVersion()} → ${info.version} (files: ${info.files?.map((f: { url: string }) => f.url).join(", ") ?? "n/a"})`,

257-261: Download progress logging looks good.

One thing to be aware of: this event can fire frequently (potentially many times per second). If log volume becomes a concern in production, consider throttling or logging at coarser intervals (e.g., every 10%). Not urgent given the diagnostic purpose of this PR.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 8, 2026

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch
  • ✅ Electric Fly.io app

Thank you for your contribution! 🎉

@Kitenite Kitenite merged commit 3e506fe into main Feb 8, 2026
14 checks passed
@Kitenite Kitenite deleted the kitenite/debug-version-autodupdate branch February 8, 2026 06:05
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.

1 participant