Skip to content

Expired previews are not getting deleted - #1909

Merged
katinthehatsite merged 13 commits into
trunkfrom
fix/expired-preview-sites-removal
Oct 22, 2025
Merged

Expired previews are not getting deleted#1909
katinthehatsite merged 13 commits into
trunkfrom
fix/expired-preview-sites-removal

Conversation

@katinthehatsite

@katinthehatsite katinthehatsite commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

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

github-actions Bot commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

📊 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

@gcsecsey gcsecsey left a comment

Copy link
Copy Markdown
Member

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

@wojtekn wojtekn left a comment

Copy link
Copy Markdown
Contributor

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.

@nightnei nightnei left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/stores/index.ts Outdated
katinthehatsite and others added 4 commits October 21, 2025 13:28
Co-authored-by: Volodymyr Makukha <nei.css@gmail.com>
…ttic/studio into fix/expired-preview-sites-removal
@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

4 participants