Consistent order across all files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5.2 KiB
Update System Fixes Summary
Overview
This document summarizes the fixes made to the launcher auto-update system to improve UX and fix macOS-specific issues.
Issues Fixed
1. Duplicate Update Popups
Problem: Two different update UI files (update.js and updater.js) were both listening for update events, causing duplicate popups to appear.
Solution:
- Disabled
updater.jsinindex.html(commented out the script tag) - Now only
update.jshandles all update UI with improved features
2. Missing Skip Button
Problem: Users were soft-locked on the update screen with no way to dismiss it, especially problematic on macOS where auto-install often fails.
Solution:
- Added "Skip for now (not recommended)" button to update popup
- Skip button appears:
- After 30 seconds (timeout fallback)
- Immediately on any update error
- After install attempt fails (5 second timeout)
- Always visible once download completes
3. macOS Auto-Install Failure
Problem: quitAndInstall() silently fails on unsigned macOS apps, leaving users stuck.
Solution:
- Detect macOS in
main.jsand sendautoInstallSupported: falseflag - On macOS, show "Download Manually (Recommended)" as primary action
- "Try Install & Restart" shown as secondary option
- Added force quit fallback in
install-updatehandler for macOS - Clear messaging: "Update downloaded but auto-install may not work on macOS"
4. Missing IPC Handlers
Problem: open-download-page IPC handler was not registered, causing errors when clicking manual download.
Solution:
- Added
open-download-pagehandler inmain.jsthat opens GitHub releases page - Added
quitAndInstallUpdatealias inpreload.jsfor compatibility
5. Interface Blocking Not Removed
Problem: unblockInterface() method was called but never defined, leaving the UI blurred after closing popup.
Solution:
- Added complete
unblockInterface()method that:- Removes
interface-blockedclass from main content - Removes
no-selectclass from body - Properly removes event listeners using stored bound function references
- Removes
6. Breathing Animation on Downloaded State
Problem: The pulse/breathing animation continued after download completed, which felt inappropriate for a "ready to install" state.
Solution:
- Remove
update-popup-pulseclass inshowUpdateDownloaded()method
7. Player Name Not Synced on First Install
Problem: Player name entered during installation wasn't synced to settings page input.
Solution:
- In
install.js, sync player name to bothplayerNameandsettingsPlayerNameinputs after installation completes
Files Modified
GUI/index.html
- Commented out
updater.jsscript tag (duplicate update UI)
GUI/js/update.js
- Removed legacy
onUpdatePopuplistener - Added
closeUpdatePopup()method - Added
unblockInterface()method - Added skip button to popup HTML
- Added skip button visibility logic (30s timeout, on error, after download)
- Added macOS detection and alternative UI (manual download as primary)
- Removed pulse animation when download completes
- Added console logging for debugging
- Added extra DOM check to prevent duplicate popups
- Fixed manual download button to show "Opened in browser" and close popup
main.js
- Changed
autoUpdater.autoDownloadfromfalsetotrue - Added macOS error handling with
requiresManualDownloadflag - Added
autoInstallSupportedflag toupdate-downloadedevent - Added
open-download-pageIPC handler - Enhanced
install-updatehandler with macOS force quit fallback
preload.js
- Added
quitAndInstallUpdatealias forinstall-updateIPC
GUI/js/install.js
- Sync player name to
settingsPlayerNameinput after installation
backend/utils/clientPatcher.js
- Removed server patching code (server uses pre-patched JAR from CDN)
- Simplified to client-only patching
- Removed unused imports:
crypto,AdmZip,execSync,spawn,getJavaExec,getBundledJavaPath,JRE_DIR - Removed unused methods:
stringToUtf8(),findAndReplaceDomainUtf8() - Cleaned up comments and documentation
- Localhost/local dev code moved to
clientPatcher.localhost.js.bakfor reference
Testing
To test the update popup manually, you can temporarily add this debug code to update.js init():
// DEBUG: Simulate update available popup after 2 seconds
setTimeout(() => {
this.showUpdatePopup({
currentVersion: '2.0.0',
newVersion: '2.1.0',
releaseNotes: 'Debug test update'
});
// Simulate download complete after 3 more seconds
setTimeout(() => {
this.showUpdateDownloaded({
version: '2.1.0',
platform: 'darwin',
autoInstallSupported: false // Simulate macOS
});
}, 3000);
}, 2000);
Platform-Specific Behavior
Windows/Linux
- Auto-download enabled
- "Install & Restart" as primary action
- Skip button available as fallback
macOS
- Auto-download enabled (download works, install doesn't)
- "Download Manually (Recommended)" as primary action
- "Try Install & Restart" as secondary option
- Skip button always visible after download
- Force quit fallback if quitAndInstall fails