Local-first editing for hosted projects — fast opens, offline work, background sync.
Hosted Projects on Desktop (Local-First Sync)
When you open one of your hosted projects in the desktop Studio (they are listed under Cloud Projects in the launcher), the editor no longer talks to the cloud database on every click. Instead, the project is copied once into a local working copy on your machine, everything you do runs against that copy at local speed, and a background sync keeps the cloud in step while you work.
You don't have to set anything up — this is how hosted projects open on desktop by default.
What You'll Notice#
| Before | Now |
|---|---|
| Every editor action crossed the internet | Everything runs locally — saves and map edits are instant |
| Opening needed a working connection | After the first open, the project opens offline too |
| Slow project opens on hosted projects | Opens are as fast as a local project |
How It Works#
- First open — the Studio downloads your project into a local copy (you'll see a progress bar; time depends on project size and connection). This happens once per machine.
- While you edit — a background sync pushes your changes to the cloud about every 30 seconds, and always once more when you close the project. You never trigger it manually.
- Next open — the Studio quickly checks whether the cloud copy changed since your last session (for example, from edits made in the browser editor). If nothing changed elsewhere, the project opens immediately.
One Editor at a Time#
Local-first editing uses a writer lease: while your desktop session is syncing, it holds the lease on the project, and a second desktop opening the same project is told who currently holds it. This is a single-writer model — the sync never merges two people's simultaneous edits.
Editing in the browser editor while a desktop session is open is not coordinated yet. The website editor does not check the lease. If you edit the same project from both places at once, the next desktop open will detect the divergence and ask you to choose (see below) — but the answer is either/or, not a merge. Pick one editor per project per sitting.
When Both Sides Changed#
If the cloud copy changed while you also have unsynced local edits (usually: someone edited in the browser editor while your desktop was offline), the next desktop open stops and asks:
| Choice | What happens |
|---|---|
| Keep my changes | Your local copy becomes the truth — the cloud content is replaced with yours on the next sync |
| Take the cloud version | Your unsynced local edits are discarded and the cloud copy is re-downloaded |
| Cancel | Nothing happens; the project stays closed |
There is no silent merging — the Studio always asks before either side loses anything.
When the Sync Holds Back Deletions#
The sync deletes a row from the cloud copy when you delete it locally. If your local copy ever loses rows by accident — most often because a damaged local store was repaired automatically and came back empty or out of date — that rule would delete them from the cloud as well. To stop that, the sync refuses to delete from the cloud when:
| Situation | Why it looks wrong |
|---|---|
| A table would lose more than half of its cloud rows and more than 20 rows in one pass | Deliberate cleanups are rarely that large |
| Your whole local copy is empty | Nothing to keep usually means the copy was wiped, not that you deleted everything |
Everything else keeps syncing: your new and changed rows still go up. Only the deletions wait.
The next time you open the project, Studio shows Cloud sync held back deletions, listing each table and how many rows it kept:
| Choice | What happens |
|---|---|
| Keep the cloud rows | Nothing is deleted. You'll be asked again on the next open while the difference remains. |
| Delete them from the cloud | You confirm the deletions were yours. The next sync deletes those rows from the cloud, once. |
- Small deletes are never held. Removing a few quests or a handful of items syncs as normal.
- Approving applies once. If the same table later loses more than half its rows again, you'll be asked again.
Offline Work#
If you're offline (or the service is unreachable), an already-downloaded hosted project still opens and is fully editable. Your changes sync automatically the next time you open it with a connection. The log notes when a session runs offline.
Gotchas#
- The first open on a new machine needs a connection — there's no local copy yet to fall back to.
- Publish uses your local content. Publishing to your live server pushes what your editor sees — the local copy. If you just edited in the browser editor, open the project on desktop first so the check can pull those changes in.
- Playtest characters stay local. Playtesting a hosted project on desktop runs a local game server with its own store; test characters don't sync to the cloud database.
- Live collaboration and local-first are mutually exclusive. Real-time co-editing (browser editor collab rooms) needs everyone on the same database; desktop local-first trades that for speed and offline capability.
- Escape hatch: set
cloudLocalFirsttofalsein the desktop Studio settings file to restore the old direct-to-cloud behavior for hosted projects.