Skip to content

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

Merged
fredrikekelund merged 4 commits into
trunkfrom
stu-1494-clean-up-old-cruft
Jun 11, 2026
Merged

Data migration to delete appdata-v1.deprecated.json and related cruft#3685
fredrikekelund merged 4 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

wpmobilebot commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing ba7dbb5 vs trunk

app-size

Metric trunk ba7dbb5 Diff Change
App Size (Mac) 1358.11 MB 1358.12 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk ba7dbb5 Diff Change
load 1646 ms 1608 ms 38 ms ⚪ 0.0%

site-startup

Metric trunk ba7dbb5 Diff Change
siteCreation 9023 ms 9032 ms +9 ms ⚪ 0.0%
siteStartup 4427 ms 4417 ms 10 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@bcotrim bcotrim 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.

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 Jun 4, 2026
@fredrikekelund
fredrikekelund merged commit c10b996 into trunk Jun 11, 2026
14 of 15 checks passed
@fredrikekelund
fredrikekelund deleted the stu-1494-clean-up-old-cruft branch June 11, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants