Skip to content

Conversation

@katinthehatsite
Copy link
Contributor

@katinthehatsite katinthehatsite commented Dec 15, 2025

Related issues

Fixes STU-1127

Proposed Changes

This PR ensures that the local site can not be deleted when syncing to WP.com (either pulling or pushing).

Testing Instructions

  • Pull the changes from this branch
  • Start Studio
  • Navigate to the Sync tab
  • Connect a site
  • Start either push or pull
  • Navigate to the Settings tab
  • Click on the three ellipsis in the right corner
  • Confirm that the Delete site button is disabled and the site can not be deleted
  • Try to delete the Studio site from the context menu
  • Confirm that the Delete site button is disabled
Screenshot 2025-12-15 at 4 22 38 PM

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@katinthehatsite katinthehatsite self-assigned this Dec 15, 2025
@katinthehatsite katinthehatsite marked this pull request as draft December 15, 2025 14:51
@katinthehatsite katinthehatsite changed the title Ensure the site can't be deleted when syncing Studio: Ensure the site can't be deleted when syncing Dec 15, 2025
@katinthehatsite katinthehatsite requested a review from a team December 15, 2025 15:24
@katinthehatsite katinthehatsite marked this pull request as ready for review December 15, 2025 15:24
@github-actions
Copy link
Contributor

📊 Performance Test Results

Comparing d8fe9dc vs trunk

site-editor

Metric trunk d8fe9dc Diff Change
load 15230.00 ms 13719.00 ms -1511.00 ms 🟢 -9.9%

site-startup

Metric trunk d8fe9dc Diff Change
siteCreation 25904.00 ms 26553.00 ms +649.00 ms 🔴 2.5%
siteStartup 11048.00 ms 8995.00 ms -2053.00 ms 🟢 -18.6%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

Thank you for the fix, Kat! I have observed one inconsistency where the Delete site... button in the Settings tab is disabled for the whole process, while the similar option in the sidebar dropdown gets disabled only for a small part of the process:

CleanShot.2025-12-17.at.13.42.06.mp4

@katinthehatsite
Copy link
Contributor Author

Thank you for the fix, Kat! I have observed one inconsistency where the Delete site... button in the Settings tab is disabled for the whole process, while the similar option in the sidebar dropdown gets disabled only for a small part of the process:

👀

@katinthehatsite
Copy link
Contributor Author

Great catch @ivan-ottinger - it should be fixed now. Would you be able to give it another try? Thank you!

Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

Great catch @ivan-ottinger - it should be fixed now. Would you be able to give it another try? Thank you!

Thanks for the fix, Kat. The changes work as expected (bot delete buttons are now disabled in the same way). The code looks generally good to me. I have just shared one suggestion and noticed that tests are failing.

Copy link
Contributor

@gcsecsey gcsecsey left a comment

Choose a reason for hiding this comment

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

Thanks @katinthehatsite for working on this! I tested both pushing and pulling and now I confirm not being able to delete the site for the whole duration, either from the sidebar or from the Settings tab.

CleanShot.2025-12-17.at.17.24.18.mp4

@ivan-ottinger ivan-ottinger self-requested a review December 18, 2025 11:16
Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, Kat! All is looking good to me now. ✅

@katinthehatsite katinthehatsite merged commit efa2567 into trunk Dec 18, 2025
7 of 9 checks passed
@katinthehatsite katinthehatsite deleted the add/ensure-local-site-cannot-be-deleted-during-sync branch December 18, 2025 13:29
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.

4 participants