Sync and merge
Your file lives on your device, and the app and your agents take turns writing to it. This page explains how those writes stay safe, and what happens when you and an agent change the same thing.
Wonderblok does not sync files between devices or between people yet. Everything below is how the app and the agents on one device share a file.
One file, one lock
The app and every agent write to the same .wonderblok file, and none of them writes it directly. Each change takes a lock, reads the file as it is on disk at that moment, applies the edit, and saves it by replacing the file in one step. Nobody ever reads half a file, and two changes that arrive together are applied one after the other, each on top of the last.
Edits are checked before they are saved. If any part fails, nothing is written. apply_ops runs many edits as one: they are saved together or not at all, and the app counts them as one undo step. The app watches the file and redraws whenever it changes, so you see agent edits as they land.
Revisions
Every saved change raises the file's revision by one, and Wonderblok keeps a short record beside the file of who made each of the last 200 changes and which top-level layers it touched. get_tree prints the current revision.
An agent can pass the revision it last read to apply_ops as if_revision. If the file has moved on, the edit is refused and the reply says what changed and who changed it.
the file changed since revision 12, it is at 14 (13: 01 Welcome by the person in Wonderblok; 14: 02 Location by Claude Code); read it again before writingWhat your agent hears
If you edit in the app between two of your agent's calls, the reply to its next write includes a warning that names the frames you changed, so it knows to read them before going further. get_view also reports how many edits you made since its last call, along with what you have selected and which group is in front.
When you both change the same thing
An edit names the properties it sets, and Wonderblok applies it to the latest file. If you move a frame while your agent rewrites text in it, both changes are in the file, because they touch different properties. If you both set the same property, the later write is the one that stays. Wonderblok does not show a screen that asks you to choose.
Imports are the exception. write_page, capture and upsert_node update a frame by its key and replace what is inside it with the content they are given, so they can overwrite changes you made in that frame.
Not available yet
- Syncing a file between your devices.
- Sharing a file with teammates and working in it at the same time.
- A side-by-side screen for picking between two versions of a layer.
Your file stays on your device, which is why the rules above are enough today. Read Files, groups and frames for how a file is laid out.
Was this page helpful?
Edited Nov 8, 2026