Skip to content

fix(desktop): prevent duplicate auto-update dialogs#271

Merged
Kitenite merged 2 commits intomainfrom
unnecessary-hamster-c8c256
Dec 6, 2025
Merged

fix(desktop): prevent duplicate auto-update dialogs#271
Kitenite merged 2 commits intomainfrom
unnecessary-hamster-c8c256

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Dec 6, 2025

Add a flag to track when the update dialog is open to prevent showing multiple dialogs when the hourly update check runs repeatedly.

🤖 Generated with Claude Code

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • Bug Fixes
    • Fixed an issue where multiple update dialogs could appear simultaneously during application updates.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
website Ready Ready Preview Comment Dec 6, 2025 10:40pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 6, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The change introduces a flag-based guard mechanism in the auto-updater to prevent multiple update dialogs from appearing concurrently. The isUpdateDialogOpen flag is set when showing a dialog and reset when the dialog closes or encounters an error.

Changes

Cohort / File(s) Summary
Update Dialog Guard
apps/desktop/src/main/lib/auto-updater.ts
Added isUpdateDialogOpen flag to prevent concurrent update dialogs. Guard short-circuits the update-downloaded handler when a dialog is already open; flag is set before displaying the dialog and reset in both success and error paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–10 minutes

Possibly related PRs

Poem

🐰 A flag goes up when dialogs bloom,
No two shall occupy the room!
When updates knock, they'll wait their turn,
One dialog shown, then guards return. ✨

✨ 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 unnecessary-hamster-c8c256

📜 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 4b03824 and 8335a4b.

📒 Files selected for processing (1)
  • apps/desktop/src/main/lib/auto-updater.ts (3 hunks)

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.

Kitenite and others added 2 commits December 6, 2025 14:39
Add a flag to track when the update dialog is open to prevent showing
multiple dialogs when the hourly update check runs repeatedly.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Kitenite Kitenite force-pushed the unnecessary-hamster-c8c256 branch from 23402f6 to 8335a4b Compare December 6, 2025 22:40
@Kitenite Kitenite merged commit f51c159 into main Dec 6, 2025
6 of 7 checks passed
@Kitenite Kitenite deleted the unnecessary-hamster-c8c256 branch December 6, 2025 22:42
@coderabbitai coderabbitai Bot mentioned this pull request Dec 9, 2025
4 tasks
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