Disable Copy and Delete in context menu when any site is being added#2596
Merged
Disable Copy and Delete in context menu when any site is being added#2596
Conversation
The Settings tab disables these actions for all sites when any site is being created, but the right-click context menu only checked the individual site. Pass isAnySiteAdding from the renderer to the main process so Copy and Delete are consistently greyed out.
ivan-ottinger
approved these changes
Feb 17, 2026
Contributor
ivan-ottinger
left a comment
There was a problem hiding this comment.
The change looks good and works as expected. 👍🏼
CleanShot.2026-02-17.at.10.24.49.mp4
I have asked myself the same question as you did in the related task:
Although I wonder if we should enable the delete and copy site menu items in site settings. I don't see any issue of adding or removing other sites.
When testing, I did not observe any issues with deleting or copying a site while another site is being created.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related issues
Proposed Changes
The Settings tab disables "Copy site" and "Delete site" for all sites when any site is being created (
sites.some(site => site.isAddingSite)), but the right-click context menu only checkedsite.isAddingSitefor the individual site. This created an inconsistency where right-clicking Site B while Site A was being created showed Copy/Delete as enabled.isAnySiteAdding(computed fromsites.some(s => s.isAddingSite)) in the renderer and pass it to the main process viashowSiteContextMenu()isAnySiteAddinginstead ofisAddingSitefor the "Copy site" and "Delete site" enabled conditionsisAddingSitecontinues to be used for all other menu items (Start, Stop, Open, etc.)Testing Instructions
npm startcopy-and-delete-sites-are-disabled.mp4
Pre-merge Checklist