Skip to content

Conversation

@MiwiDots
Copy link
Member

@MiwiDots MiwiDots commented Jun 30, 2025

Summary

• Converted from hybrid auto-updater to manual-only update system as the primary method
• Completely disabled auto-updater to prevent signature validation errors
• Simplified codebase by removing 280+ lines of auto-updater complexity
• Manual GitHub API notifications are now the default and only update method

Rationale

Since we don't have Apple Developer certificates, the auto-updater always fails with signature errors. Instead of having a fallback system, it makes more sense to use the manual notification system as the primary method.

Key Changes

🚫 Auto-Updater Completely Disabled

private setupAutoUpdater(): void {
  // DISABLED: Auto-updater disabled due to lack of code signing
  log.info('Auto-updater disabled - using manual notification system', 'AutoUpdater');
  return; // No event handlers, no background processes
}

🔄 Redirected API Calls

async checkForUpdates(): Promise<boolean> {
  log.info('Auto-updater disabled - redirecting to manual update check', 'AutoUpdater');
  return this.checkForUpdatesManually(); // Always use manual system
}

🧹 Cleaned Up Codebase

Removed:

  • ❌ Auto-updater event handlers (280+ lines)
  • ❌ Signature error detection logic
  • ❌ Fallback system complexity
  • ❌ Background download processes
  • ❌ Auto-install functionality

Kept:

  • ✅ Manual GitHub API update checks
  • ✅ User-friendly notification dialogs
  • ✅ Settings UI integration
  • ✅ Rate limiting and error handling

Benefits

🎯 User Experience

  • No background failures - No more signature validation errors
  • Predictable behavior - Manual check always works the same way
  • Professional notifications - Clear, helpful update dialogs
  • Direct download links - Opens GitHub releases page

💻 Technical Benefits

  • Smaller bundle - Removed auto-updater overhead (1.29MB → 1.09MB)
  • Cleaner code - 280+ lines of complexity removed
  • Better reliability - No background processes that can fail
  • Easier maintenance - Single update path to test and maintain

🔮 Future-Ready

  • Apple Developer transition - Easy to re-enable auto-updater when signed
  • No breaking changes - Same IPC APIs maintained
  • Backwards compatible - Existing UI continues to work

User Flow

Current Experience:

  1. User clicks "Check for Updates" in Settings > About
  2. GitHub API checks for latest release
  3. Shows appropriate dialog:
    • Update available: "Download Now" → Opens GitHub releases
    • No updates: "You have the latest version"
    • Error: "Check your internet connection"

No More:

  • ❌ Background signature validation errors
  • ❌ Confusing auto-updater error dialogs
  • ❌ Failed download attempts
  • ❌ "Code object is not signed" messages

Technical Implementation

Simplified Architecture

Settings UI → Manual Check → GitHub API → User Dialog → Browser (GitHub)

vs. Previous Hybrid:

Settings UI → Auto-updater → Signature Error → Fallback → Manual Check → GitHub API → Dialog

API Compatibility

  • ✅ All existing IPC handlers maintained
  • checkForUpdates() redirects to manual system
  • ✅ UI components work unchanged
  • ✅ No breaking changes for future features

Testing

Test Manual Updates:

  1. Build current version (1.0.3)
  2. Go to Settings > About > "Check for Updates"
  3. Should detect future versions (like 1.0.4) correctly
  4. "Download Now" should open GitHub releases page

Verify No Background Errors:

  1. No signature validation errors in logs
  2. No background auto-updater processes
  3. Clean startup without update-related errors

Bundle Size Impact

  • Before: 1.29 MB (with hybrid auto-updater)
  • After: 1.09 MB (manual-only system)
  • Savings: ~200 KB + reduced complexity

This approach provides a cleaner, more reliable update experience for unsigned applications while remaining ready for future code signing when available.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Transitioned to a fully manual update system. Users will now receive update notifications and perform updates manually through the app, with no automatic update checks or installations.
  • Bug Fixes

    • Removed error dialogs and notifications related to automatic update failures and signature validation errors.
  • Chores

    • Cleaned up and simplified update-related messaging to reflect the new manual update process.

🎯 Design Decision: Manual notifications as default instead of auto-updater fallback
- Auto-updater completely disabled since we don't have code signing
- Prevents background signature validation errors
- Manual GitHub API system is now the primary and only update method
- Much cleaner and more reliable for unsigned applications

🔧 Changes Made:
- Disabled auto-updater initialization and event handlers
- Redirected checkForUpdates() to manual system
- Removed auto-download and auto-install functionality
- Cleaned up signature error detection (no longer needed)
- Simplified codebase by removing unused auto-updater complexity

💡 Benefits:
- No more background signature validation failures
- Cleaner, more predictable update experience
- Smaller bundle size (removed auto-updater overhead)
- Professional manual update notifications
- Ready for future signed app transition

🚀 User Experience:
- Settings > About > 'Check for Updates' button
- GitHub API integration with version comparison
- User-friendly dialogs with direct download links
- No confusing error messages or failed background processes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jun 30, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update removes all automatic update functionality from the AutoUpdaterService, including event handling and periodic checks, and transitions the application to a fully manual update system using the GitHub API. All code related to signature validation errors and automatic update dialogs is deleted, leaving only manual update notification logic.

Changes

File(s) Change Summary
src/main/services/AutoUpdaterService.ts Removed all automatic update logic, event handlers, and signature error dialogs; updated methods to manual mode.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant GitHub API

    User->>App: Initiate update check
    App->>GitHub API: Request latest release info
    GitHub API-->>App: Respond with release data
    App->>User: Notify if update is available or not
Loading

Possibly related PRs

Poem

A bunny hops with nimble feet,
No auto-updates, just manual treat!
The updater's quiet, it takes a rest,
Now GitHub checks will serve you best.
With logs and prompts, no hidden leap—
Updates are yours, but you must peep!
🐇✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-06-30T12_21_50_761Z-debug-0.log


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b7be566 and 26d8f9e.

📒 Files selected for processing (1)
  • src/main/services/AutoUpdaterService.ts (3 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@MiwiDots MiwiDots merged commit 8d6a758 into main Jun 30, 2025
1 of 3 checks passed
@MiwiDots MiwiDots deleted the refactor/manual-only-update-system branch June 30, 2025 17:28
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.

2 participants