#1244: undo history bounded by bytes, without lookup tables or repeated selections in its steps

History was limited by step count only; a whole-selection move of 50k paths keeps ~40 MB per
step. Steps now carry a size estimate (only unshared subtrees are visited) and the oldest are
dropped beyond a byte budget, keeping the last 8. Documents entering history drop their id
index, selections are shared between steps, the command journal is bounded (held while an
Action records), and document resources are copy-on-write. Saved files are byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmMmc1J8XeNLxhRihWv9cc
This commit is contained in:
arhammusheer
2026-10-12 11:02:17 +07:00
committed by bflatastic
co-authored by Claude Opus 5.5
parent fe8a6983c5
commit bbbafdef6b
23 changed files with 989 additions and 76 deletions
@@ -113,7 +113,7 @@ struct Snapshot {
options: Value,
undo: usize,
redo: usize,
journal: Vec<(String, Value)>,
journal: vectorcraft_engine::Journal,
dirty: bool,
}