Skip to content

Conversation

@katinthehatsite
Copy link
Contributor

@katinthehatsite katinthehatsite commented Oct 21, 2025

Related issues

Closes STU-859

Proposed Changes

This PR ensures that when you are clicking on the Clear button to remove an expired preview site from the UI, it is removed correctly from app-data and does not show back in the UI on app rerendering.

Testing Instructions

  • Pull the changes from this branch
  • Create one preview site
  • Edit your /Library/Application Support/Studio/appdata-v1.json file and set that preview site to be created 10 days ago
  • Restart the app
  • Navigate to Previews and observe that the preview site is marked as expired in the UI
  • Click on the Clear button
  • Switch to a different tab and come back to previews
  • Confirm that the expired preview site is gone
  • Restart the app
  • Confirm that the expired preview site is gone
  • Confirm that the expired preview site is removed from appdata-v1.json

Pre-merge Checklist

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

@katinthehatsite katinthehatsite self-assigned this Oct 21, 2025
@katinthehatsite katinthehatsite requested a review from a team October 21, 2025 09:14
@github-actions
Copy link
Contributor

github-actions bot commented Oct 21, 2025

📊 Performance Test Results

Comparing b5dd97a vs trunk

site-editor

Metric trunk b5dd97a Diff Change
load 10998.00 ms 10855.00 ms -143.00 ms 🟢 -1.3%

site-startup

Metric trunk b5dd97a Diff Change
siteCreation 19177.00 ms 23244.00 ms +4067.00 ms 🔴 21.2%
siteStartup 4980.00 ms 5979.00 ms +999.00 ms 🔴 20.1%

Results are median values from multiple test runs.

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

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, this looks good and works well for me. 👍

I already had a couple expired preview sites:

Image

After clearing "My Elementor Website Preview 1":

Image

After restarting the app:

Image

The preview is also removed from appdata-v1.json:

Image

Copy link
Contributor

@wojtekn wojtekn left a comment

Choose a reason for hiding this comment

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

It fixes the issue - cleared previews do not appear in my Studio again.

Copy link
Contributor

@nightnei nightnei left a comment

Choose a reason for hiding this comment

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

LGTM and works as expected (I had real expired site) 👍
Screenshot 2025-10-21 at 12 22 37
Screenshot 2025-10-21 at 12 23 16

@katinthehatsite katinthehatsite merged commit 9954077 into trunk Oct 22, 2025
12 checks passed
@katinthehatsite katinthehatsite deleted the fix/expired-preview-sites-removal branch October 22, 2025 08:22
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.

5 participants