From 3b25aa0d16071b460cc7c006d96b57441b958f22 Mon Sep 17 00:00:00 2001 From: prxnvt <53838599+prxnvt@users.noreply.github.com> Date: Sat, 24 Oct 2026 01:41:03 -0400 Subject: [PATCH] Docs: the panic guard's note says what happens to a group the command ended It keeps a step from the group's start to the restored workbook, so Undo still returns to the state before the group; the note said the history came back exactly. --- docs/architecture.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/architecture.md b/docs/architecture.md index bfbf2b8c1..4794a6ec9 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -34,7 +34,9 @@ including tests, 2026-10-10. enabled, run, journal, undoable }`; ids follow Excel's ribbon (`home.bold`, `insert.chart`, `data.sortAscending`) plus primitives (`cell.set`, `selection.set`, `range.setValues`). `Session::execute` catches escaped panics and restores the workbook, its selection and its - undo and redo history as they were before the command (never-crash guard). + undo and redo history as they were before the command (never-crash guard); a group that was + open before the command and that the command ended or rolled back stays ended and keeps a + step from its start to the restored workbook, so Undo still returns to the state before it. 2. **Edits** change the model through copy-on-write bands; undo keeps the previous snapshot. Undo retains at most 100 steps and trims older steps when its estimated retained cell storage exceeds 128 MiB. The newest step remains undoable even if that step alone exceeds the budget.