Automattic / studio

Studio by WordPress.com, a free desktop app that helps developers streamline their local WordPress development workflow.
https://developer.wordpress.com/studio/
GNU General Public License v2.0
172 stars 17 forks source link

Sites directory is not removed from disk space #223

Closed GearWestX closed 3 months ago

GearWestX commented 3 months ago

Quick summary

After you delete a site from the Studio Dashboard, it will not be deleted from the Windows directory.

Steps to reproduce

  1. Start the Studio App.
  2. Delete a site / all sites from the dashboard.
  3. Creating a new first site with the first screen that you see after Studio has been recently installed on the machine.
  4. Select the directory where to install the new site (There you can see the old deleted sites: )

bug-deleted-sites

  1. Search for the directories and files in my disk space.

found-sites

What you expected to happen

The site directory and files should be removed from the Windows space; Otherwise, users' disk space will be loaded.

What actually happened

The deleted site directory remains in the disk space but not in the Studio Dashboard:

new-site-scratch

found-sites

Impact

Most (> 50%)

Available workarounds?

Yes, easy to implement

Platform

Windows

Logs or notes

No response

liviopv commented 3 months ago

📌 REPRODUCTION RESULTS

📌 FINDINGS/SCREENSHOTS/VIDEO While the original report is from the Windows version, I was able to reproduce on the Mac version:

CleanShot 2024-06-10 at 15 45 17@2x

Above, you can see I only have 2 Studio sites, but the Studio folder shows 3 deleted sites. I expect the files would be removed if I deleted the sites.

📌 ACTIONS

wojtekn commented 3 months ago

@GearWestX @liviopv I tried on both Windows and Mac, and the directory was removed in both cases. Did you check the 'Delete site files from my computer' when you tried to delete the site?

Screenshot 2024-06-10 at 17 00 10

Screenshot 2024-06-10 170213

liviopv commented 3 months ago

Thanks @wojtekn! I missed it - can we make the checkbox more visually distinguishable?

I deleted another site and the files were removed. What about you @GearWestX?

wojtekn commented 3 months ago

Thanks @wojtekn! I missed it - can we make the checkbox more visually distinguishable?

Thanks for confirming that. This window is a default system window, so I think we don't have the ability to change what this checkbox looks like.

GearWestX commented 3 months ago

@liviopv I completely missed that too.

It would be very helpful to have a second Windows pop-up that asks if the user wants to delete the site from the dashboard only or from the computer as well, just to make sure that users don't miss that.

Thanks @wojtekn for the help :)