Everyone who opens a flow edits the same live document: what one person changes shows for the others at once, nothing has to be saved, and runs use exactly what's on screen.
What you see
- Status (next to the flow name): Connecting, Synced (the server has everything), Syncing (sending your latest edits), Offline (your edits stay in this browser and merge when you're back), Read only (you can look but not change it).
- Who's here: an avatar per person in the header (their color; +N past four). Your own other tabs never show. A ✦ beside them: someone's agent just changed the flow for them.
- Their pointers: each person's pointer moves on the canvas with their name, in their color, at any zoom.
- Their selections: a node someone else selected gets an outline in their color with their name above it.
- Fields: a field someone is typing in gets a ring in their color and their name beside its label; Node details shows who else has that node open. In code fields you see their caret and selection, and letters typed at the same time all stay.
- Follow: open the avatars menu and pick someone. Your view goes where theirs is (and opens the node they have open) until you pan or zoom. Spotlight me: everyone follows you; each person steps out by panning, and the menu offers to follow it again.
- Cursor chat: with the pointer on the canvas, press
/, type and press Enter. A bubble follows your pointer for 5 seconds; nothing is kept. - Runs together: when someone starts a run, the others get "Ayu is running a test" with Watch (the same run, live). Only editors can pause, stop or answer what it waits for.
Editing
- Every change goes into the document as you make it: moving, connecting, fields, settings, notes, the name. Two people editing different fields of the same node never clash; the same field takes the last change.
- Undo / redo (
⌘Z,⌘⇧Z) only take back your own changes, never someone else's. Typing in a field (or one drag) within a second is one step. - Offline: edits made without a connection are kept in this browser and merged when it reconnects (unless the flow was compacted meanwhile, see below: then the editor starts again from the server's copy).
- Comments and suggestions: see .
- Read only: viewers and commenters of the flow (), a frozen seat, a suspended workspace or maintenance see it live but can't change it; the server refuses their edits too.
Runs, tests and publishing
Test runs, Run, tests and Publish first wait until the server has your latest edits (5 seconds at most, else "Your latest edits haven't reached the server yet"), then use the draft as it is right now: the live document when someone has the flow open, else the copy the server last stored.
How it works
- The collaboration server (Hocuspocus, Yjs) runs inside mooflair's server on
/collab, one document per flow (flow:<id>). The editor asks for a ticket (aStudioCollab, 10 minutes, renewed on every reconnect) that says who you are and whether you may edit (editors and the owner,flowAccess); everyone else is read-only on the server. - The document (
FlowDoc) is the source of the draft. Two seconds after the last edit (10 seconds at most) it's stored, and the graph, name and last editor are mirrored onto the Flow for lists, search, the scheduler and runs when nobody has it open. A draft that doesn't fit the editor's shape is stored but not mirrored. - Layout:
nodes,edgesandnotesare maps by id (a node's fields one entry each),meta.namethe name (src/lib/collab/graph.ts). Long text fields (textarea, prompt, code) areY.Text: a change writes only the typed part, and code fields are bound to it (Monaco, with carets from presence). The Studio store'schange()writes only what differs, and the document drives the canvas. - Origins: your edits and your typing (your undo), the agent's edits (written by the server: its drafts, or a small change you undo from the chat), and everyone else's. Undo follows the canvas you're on.
- History: two seconds after a burst of edits the server stores the document; at most every 10 minutes that also makes a snapshot in the version history, with who edited since the last one ().
- Compaction: when nobody has a flow open and it has a snapshot since its last compaction, the stored document is rewritten without its history in a new epoch. The ticket carries the epoch; a browser's kept copy is per epoch, so an older one is dropped, never merged.
- Presence is Yjs awareness (never stored): pointer, viewport, selection, open node, focused field and caret, cursor chat, spotlight, the run being watched, the agent's last change.
- Comments and suggestions aren't in the document: they're stored apart (
FlowComment; suggestions are draft canvases in the document), and every change tells everyone who has the flow open (a Hocuspocus stateless message) so their editor fetches them again. - Launch runs one mooflair server: documents live in its memory. Scaling out adds a Redis extension; nothing else changes.
FAQ
Do I still need to save?
No. There's no Save: everything is in the live document as you make it. ⌘S waits until the server has it.
What happens if two people change the same field?
The last change wins for that field. Different fields, nodes or edges merge.
Can someone undo my work?
No. Undo only takes back your own changes.
What if I lose my connection?
Keep editing: the status shows Offline, your edits stay in this browser and merge when you reconnect.