Tauri → Electron migration runbook
Three scripts. Run in order. Each one is idempotent and prints what it will do before it does it.
scripts/migration/01-cut-migration-release.mjs # cut v0.12.0, the last Tauri release
scripts/migration/02-validate-migration.mjs # guided post-release smoke test
scripts/migration/03-post-migration-cleanup.mjs # delete src-tauri, flip defaults (run after users stabilize)
When to run what
| Step | When | What user-visible effect |
|---|---|---|
| 01 | Ready to ship the migration | Tauri users see "OpenWork is moving" prompt on next update |
| 02 | Right after the workflow finishes | Dogfood validation — no user effect |
| 03 | After 1-2 weeks of stable Electron telemetry | Dev repo is Electron-only; no user effect |
Current safe-prep rollout
The next release is intentionally non-destructive:
- Tauri remains the main/stable desktop build and keeps using the existing
Tauri updater feed (
latest.json). - The alpha macOS arm64 release now carries both notarized Tauri artifacts
(
latest.json) and notarized Electron artifacts (latest-mac.yml) on the rollingalpha-macos-latestrelease. - Electron is built as a preview artifact on every push by
.github/workflows/build-electron-desktop.yml. - Pushes to
devormainrefresh the rolling prerelease bucket at https://github.com/different-ai/openwork/releases/tag/electron-preview-latest. - The Debug settings migration controls are Tauri-only and developer-mode only.
The default action, Prepare migration data, only writes
migration-snapshot.v1.json; it does not quit, replace, or delete Tauri. - The install handoff requires a pasted Electron artifact URL plus two explicit
confirmations. On macOS the native handoff keeps the previous bundle at
OpenWork.app.migrate-bakfor rollback.
Use this safe-prep release to test migration data capture and preview downloads before enabling any user-facing migration prompt.
Sharing Electron preview downloads
- Wait for
Build Electron Desktop Previewto finish on the target commit. - Share the rolling preview release page: https://github.com/different-ai/openwork/releases/tag/electron-preview-latest
- Ask testers to download the matching platform artifact:
- macOS Apple Silicon:
openwork-mac-arm64-*.dmgor.zip - macOS Intel:
openwork-mac-x64-*.dmgor.zip - Windows:
openwork-win-x64-*.exe - Linux:
openwork-linux-x64-*.AppImageor.tar.gz
- macOS Apple Silicon:
Do not point stable Tauri users at these preview assets as an automatic update until the explicit migration release is cut and validated.
01 — cut-migration-release.mjs
node scripts/migration/01-cut-migration-release.mjs --version 0.12.0 \
--mac-url 'https://github.com/different-ai/openwork/releases/download/v0.12.0/OpenWork-darwin-arm64-0.12.0-mac.zip' \
--dry-run # inspect planned changes first
What it does:
- Refuses to run on a dirty working tree.
- Runs
pnpm bump:set -- <version>(bumps all 5 sync files per AGENTS.md release runbook). - Creates a release-config fragment at
apps/app/.env.migration-releasesettingVITE_OPENWORK_MIGRATION_RELEASE=1and the per-platform download URLs. TheRelease Appworkflow copies this into the build env so the migration prompt is dormant on every other build but live for this release. - Commits the version bump.
- Creates and pushes the
vX.Y.Ztag. - Prints
gh run watchcommand so you can follow the workflow.
Drop --dry-run to actually execute.
02 — validate-migration.mjs
node scripts/migration/02-validate-migration.mjs --tag v0.12.0
Interactive guided check. Prints steps and confirms each one before moving on:
- Downloads the Tauri DMG for the tag and verifies its minisign signature (reuses the existing updater public key).
- Downloads the Electron .zip for the tag and verifies the Apple Developer ID signature.
- Prompts you to install the Tauri DMG on a fresh machine / VM and confirm the migration prompt appears.
- Drops a canary key into localStorage on the Tauri side, triggers
"Install now", and checks that the canary survives into the Electron
launch via
readMigrationSnapshot+ localStorage inspection. - Reports pass/fail for each step.
Needs --skip-manual to run the automated parts only. Useful inside a
release-review meeting as a shared checklist.
03 — post-migration-cleanup.mjs
node scripts/migration/03-post-migration-cleanup.mjs --dry-run
Once v0.12.x has been stable for 1-2 weeks:
- Flips
apps/desktop/package.jsondefaults:dev→node ./scripts/electron-dev.mjsbuild→node ./scripts/electron-build.mjspackage→pnpm run build && pnpm exec electron-builder …
- Removes
apps/desktop/src-tauri/entirely. Electron icons and generated sidecars already live underapps/desktop/resources/, so this step no longer removes anything the Electron packager needs. - Strips
@tauri-apps/*fromapps/app/package.jsonandapps/story-book/package.json. - Collapses
apps/app/src/app/lib/desktop-tauri.tsintodesktop.ts(direct Electron implementation). - Updates
AGENTS.md,ARCHITECTURE.md,README.md, translated READMEs to drop Tauri references. - Updates the release runbook in
AGENTS.mdto remove theCargo.tomlandtauri.conf.jsonversion-bump entries. - Creates a commit with the combined cleanup.
Drop --dry-run to actually perform the changes.
Emergency rollback
If the v0.12.0 migration release is bad:
- Users on Electron already: ship v0.12.1 via electron-updater. Same mechanism as any other update.
- Users still on Tauri: the migrate prompt is gated on
VITE_OPENWORK_MIGRATION_RELEASE=1at build time. Re-cut the release with that flag unset, minisign-sign a replacementlatest.json, and users who haven't clicked "Install now" yet will fall back to the non-migrating release. - Users mid-migration: the Rust
migrate_to_electroncommand keeps the previous.appatOpenWork.app.migrate-bak. Instruct users tomv OpenWork.app.migrate-bak OpenWork.appif the Electron launch fails.