Commit Graph

3 Commits

Author SHA1 Message Date
Fabian @ Blax Software 596dc6827e BF memory: a newer save brings its own bits, bits reach the account when you leave, room for them
A project that comes in with the same circuit open (a newer save from
another computer, a savegame restored in place, a shared link opened
again) now runs from the bits it brings. Before, the running circuit
went on with this computer's old bits and wrote them over the newer ones
at the next save, and a savegame could not undo Power off and on.

Bits changed only by buttons or a clock are sent to the account when the
page is hidden or closed, when you leave the project, and before signing
out, so they are no longer lost by "remove from this browser" and reach
the other computer. A running clock alone still sends nothing. Bits alone
keep the project's save time, so an edit saved on another computer wins
over them and they end up in its savegames.

What circuits hold has its own room of 500 KB per project on top of the
2 MB limit, in the browser, the account and share links. When it is full,
the circuits left longest ago start from 0; a circuit that holds more than
that on its own says so once. A project can no longer become too large to
load because of its memory.

A savegame opened as a copy saves the project it leaves first, like every
other way of switching projects.

Tests now run the editor itself (in a stand-in browser with an account
server) for going into components and back, reloads, two projects, other
computers, savegames, signing out and the room limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:44:43 +01:00
Fabian @ Blax Software c5b67ee7c1 R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
  everywhere and the other becomes a savegame of it (new endpoint to keep
  a savegame without replacing the save), never an "(other device)" copy.
  A first visit keeps its starter unsaved until something changes, and
  the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
  selected (or the project button) opens a pause menu: Resume, Save,
  Save as copy, Load, Settings, How to play, Main menu. The projects
  dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
  duplicate, unlink, delete, more = the right-click menu), only the
  settings that matter for the part; pins, component tools, keys, cable
  and panel options fold away and remember it. X/Y fields removed.
  The Circuit tab folds its component settings, transistor breakdown
  and tools the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:36:17 +02:00
Fabian @ Blax Software 08b086a71e A crash-safe storage, savegames and daily backups
- Writes go to a flushed temporary file and are renamed into place; the last
  intact version stays as .bak and reads fall back to it, so a power cut
  never leaves a damaged save. Same file format as before.
- Savegames per account project (newest 30, one per day for 90 days), kept
  before restores and deletions; deleted projects restorable for 30 days.
  Projects dialog: savegames per project and "Recently deleted".
- Daily gzip backup of data/ into backups/ (14 newest + monthly), restore
  script scripts/restore-backup.mjs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 13:20:55 +02:00