Skip to content

Data migration to delete appdata-v1.deprecated.json and related cruft#3685

Open
fredrikekelund wants to merge 3 commits into
trunkfrom
stu-1494-clean-up-old-cruft
Open

Data migration to delete appdata-v1.deprecated.json and related cruft#3685
fredrikekelund wants to merge 3 commits into
trunkfrom
stu-1494-clean-up-old-cruft

Conversation

@fredrikekelund
Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Claude did the implementation over two passes, using a detailed spec from me.

Proposed Changes

In #2793 and related PRs, we copied appdata-v1.json into three decoupled config files in ~/.studio. We also copied the server-files and certificates directories to ~/.studio.

The migration went off smoothly. This PR adds a new migration that removes the original paths from the user's system.

Testing Instructions

  1. Run open ~/Library/Application\ Support/Studio in a terminal.
  2. Ensure that you have either an appdata-v1.deprecated.json file, a server-files directory, or a certificates directory. If not, create an empty server-files directory.
  3. Run npm start.
  4. Ensure that appdata-v1.deprecated.json, server-files, and certificates are all removed.

Pre-merge Checklist

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

In #2793 and related PRs, we copied `appdata-v1.json` into three decoupled config files in `~/.studio`. We also copied the `server-files` and `certificates` directories to `~/.studio`.

The migration went off smoothly. This new migration removes the original paths from the user's system.
@fredrikekelund fredrikekelund requested review from a team and bcotrim June 3, 2026 12:24
@fredrikekelund fredrikekelund self-assigned this Jun 3, 2026
@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented Jun 3, 2026

📊 Performance Test Results

Comparing 6d90baf vs trunk

app-size

Metric trunk 6d90baf Diff Change
App Size (Mac) 1332.79 MB 1334.69 MB +1.90 MB 🔴 0.1%

site-editor

Metric trunk 6d90baf Diff Change
load 1629 ms 1650 ms +21 ms ⚪ 0.0%

site-startup

Metric trunk 6d90baf Diff Change
siteCreation 9013 ms 9004 ms 9 ms ⚪ 0.0%
siteStartup 4410 ms 4442 ms +32 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

Copy link
Copy Markdown
Contributor

@bcotrim bcotrim left a comment

Choose a reason for hiding this comment

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

appdata-v1.json is only renamed to appdata-v1.deprecated.json after the split-config migration completes. If that migration fails before the rename, this cleanup would delete the raw legacy config on the next launch, potentially removing the only recoverable source data.

Should we only delete appdata-v1.deprecated.json?

@fredrikekelund
Copy link
Copy Markdown
Contributor Author

@bcotrim, good call 👍 Thanks for staying alert. I changed the migration condition to only run if appdata-v1.deprecated.json exists, as that's our signal that 02-migrate-to-split-config.ts was successful

@fredrikekelund fredrikekelund changed the title Data migration to delete appdata-v1.json and related cruft Data migration to delete appdata-v1.deprecated.json and related cruft Jun 4, 2026
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.

3 participants