mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-29 21:06:50 -06:00
Session::execute ran a command under guard::run but normalised what it changed afterwards, outside it: a panic in normalisation escaped execute instead of becoming EngineError::Internal with the edit rolled back. Inside a batch it unwound through Session::grouped, which then never restored the undo limit it had lifted or ended the group. Normalising is now the last step of the guarded result chain, so a panic there fails the command like one in the command itself (and a batch step fails like any other failed step); live text previews normalise under the guard too. The other half of #1085, restoring grouped()'s state when its closure panics, is left alone: #1419 rewrites that function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LvG6E2qDnjtMzfPVuEP7iH