feat: add session undo and redo
This commit is contained in:
@@ -101,6 +101,21 @@ uses on a first run, so "reset" and "a brand-new browser" cannot drift apart.
|
||||
Both are preceded in the UI by a JSON backup download that must succeed before
|
||||
the destructive write is attempted.
|
||||
|
||||
## Session undo and redo
|
||||
|
||||
The snapshot store keeps up to 50 prior saved datasets in memory. A changed
|
||||
`mutate` adds one step after its write succeeds; an unchanged mutation adds
|
||||
none. Undo and redo run through the same queue and persist their target dataset
|
||||
before changing the visible snapshot or either history stack. A failed write
|
||||
therefore leaves both the data and the available undo/redo actions intact.
|
||||
|
||||
Import and reset clear the stacks only after their write succeeds. They are
|
||||
whole-dataset replacement flows with backup-first protection, not ordinary
|
||||
undoable edits. History is not in `Dataset` or IndexedDB and vanishes on reload.
|
||||
The header reads a stable history capability snapshot from the store to enable
|
||||
its controls; keyboard shortcuts skip editable fields so browser text undo
|
||||
still works.
|
||||
|
||||
## Money
|
||||
|
||||
A float, deliberately, with two rules that make it safe:
|
||||
|
||||
Reference in New Issue
Block a user