Saving and autosave

What the browser keeps, what the account keeps, and when each of them writes.

Signed out

Everything you do is written to this browser as you work. The live document is saved a quarter of a second after you stop editing, so closing the tab loses nothing and reopening it puts you back where you were.

Pressing Save puts the document on this browser's shelf of projects, which is what the Save menu's list reads. Nothing leaves the machine.

This is real, but it is one browser. Clearing site data, a private window, or simply using a different laptop means a different shelf.

Signed in

Two things happen instead of one. The browser copy keeps being written exactly as above, and the project is also saved to your account.

Account autosave is deliberately narrow: it only writes a project the account already has. A new document is created on the account when you press Save, never behind your back. Once it exists, edits are pushed up about a second and a half after you stop typing, and the URL becomes /p/<id> so the link is stable.

The Save button

It is a split button. The wide half saves. The chevron opens the rest:

  • Save a copy, which forks the open document into a second project.
  • Save to my account when you are signed out, which is the one press that turns a browser project into an account one.
  • History, to inspect and restore earlier account saves.
  • Download JSON, the complete Mokxi project file.
  • Download SPICE, an ngspice .cir deck for the analog part of the circuit, with the engine's own model cards and each op-amp as its macromodel subcircuit. Boards and digital-only parts are listed as comments instead of being given made-up SPICE behavior.
  • Open JSON or SPICE, which opens a Mokxi project or imports a SPICE netlist: voltage sources, resistors, capacitors, inductors, diodes, BJTs, MOSFETs and Mokxi's own op-amp subcircuits, laid out on the canvas and wired. Anything Mokxi cannot import is named, never dropped quietly. SPICE netlists has the details.
  • Built-in projects, the circuits that ship with Mokxi.

Ctrl/Cmd+S does what the wide half does, from anywhere in the editor.

The save state

The label under the button says where things stand: unsaved changes while you are editing, Saving while a write is in flight, and Saved when it is done. Saving stays up for a moment even when the write takes no time at all, so a save that worked is still something you saw.

When a save is refused

Two cases, and neither of them loses work.

Your session expired. The account refused the write, so the document goes to this browser instead and the editor says so. Sign in again and press Save.

You are at the project cap. The free plan keeps ten projects. The message names the number and the way out: delete one, or move to Pro. Free, Pro, Classroom and Student has the figures.

More on what to do in a project did not save.

Version history

Every project on your account keeps its last two hundred saves, on every plan. A save is kept each time you press Save (or Ctrl/Cmd+S) and each time you restore one. While autosave runs, autosaves that land within a minute of each other are folded into one save, up to ten minutes of editing each, so the list is your afternoon rather than your last few keystrokes. Past two hundred, the oldest drop off.

The free plan opens and restores the newest twenty. The older ones are still there, grayed with a padlock and Restore with Pro; Pro, Student and Classroom open all of them, and so does being a student in a class your teacher pays for. Moving from a paid plan back to Free deletes nothing: the older saves lock, and upgrading again opens them.

Open the list from History in the Save menu, or with Ctrl/Cmd+Shift+H. It opens down the right of the editor, newest save at the top, each line saying how long ago it was and what that save changed: "+2 parts", "Code changed", or the name it was given.

Click a line and that save is drawn on the canvas. You are looking at it, not editing it: the canvas is read-only while it is up, nothing is written to your account, and the work you had open is waiting behind it.

  • Back to now puts your work back exactly as it was. Closing the sheet does the same thing.
  • Restore this version makes the save on screen the project again. It is an ordinary save, so what it replaced stays in the history, so a restore you did not mean is undone by restoring the save above it.

History needs a project saved to an account. Signed out, or on a document you have never saved, the sheet says so in one line: there is nothing kept to list. Someone else's project has a history too, and it is theirs, not yours. Fork it and your own history starts from the fork.

Watching, not editing

Opening someone else's project, or joining a live room with a watch link, puts the editor in a read-only state. Pressing Save there forks the project into one of your own rather than refusing. See sharing a project.