Skip to content

fix: add confirmation dialog before resetting settings#481

Merged
lacymorrow merged 2 commits intomainfrom
fix/reset-confirmation
Mar 20, 2026
Merged

fix: add confirmation dialog before resetting settings#481
lacymorrow merged 2 commits intomainfrom
fix/reset-confirmation

Conversation

@lacymorrow
Copy link
Copy Markdown
Owner

Problem

The "Reset CrossOver" menu item in the tray context menu is positioned right next to "Quit" with no confirmation dialog. Users accidentally click it and lose all their settings.

Changes

  1. Confirmation dialogsrc/main/menu.js: Added a warning dialog (dialog.showMessageBox) with Cancel/Reset buttons before executing the reset. Cancel is the default button.
  2. Menu separationsrc/main/tray.js: Added separators around the reset menu item to visually distinguish it from Quit.

Closes #391

Add a warning dialog with Cancel/Reset buttons before executing
Reset CrossOver to prevent accidental settings loss. Also adds
separators around the reset menu item in the tray to visually
separate it from Quit.

Closes #391
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a user experience issue where the 'Reset CrossOver' option could be accidentally clicked, leading to loss of all settings. The changes introduce a confirmation step before the reset action is performed and visually separates the reset option in the tray menu, significantly improving user safety and preventing unintended data loss.

Highlights

  • Confirmation Dialog: Implemented a warning dialog using dialog.showMessageBox in src/main/menu.js that prompts users for confirmation before resetting application settings. The dialog includes 'Cancel' and 'Reset' buttons, with 'Cancel' as the default.
  • Menu Separation: Added visual separators around the 'Reset CrossOver' menu item in src/main/tray.js to distinguish it from other menu options, particularly 'Quit', reducing the chance of accidental clicks.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses a user experience issue by adding a confirmation dialog before resetting settings and visually separating the reset menu item. The changes are well-implemented. My review includes one suggestion for src/main/menu.js to improve code consistency with the rest of the project. The change in src/main/tray.js is a good addition for usability.


// Open dialog
reset.app()
const { dialog } = require('electron')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with the rest of the project and to avoid re-requiring the module on every click, it's better to move this require statement to the top of the file. Most other files in the project (e.g., crossover.js, dialog.js) declare their dependencies at the top.

@lacymorrow lacymorrow merged commit cf72e19 into main Mar 20, 2026
1 of 2 checks passed
@lacymorrow lacymorrow deleted the fix/reset-confirmation branch March 20, 2026 20: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.

[UI ISSUE] Reset all settings way too easy to accidentally click

1 participant