In lib/history/command_engine.dart: executeKind swallows commands while a transaction is open (line 130), beginTransaction overwrites the pending snapshot (line 182), and undoOwnLatest has no transaction guard. lib/agent/agent_controller.dart (around line 440) holds a transaction open across the awaits of a whole agent turn.
Scenarios:
The agent is mid-turn and the user drags a node. The drag's begin overwrites the agent's snapshot and its commit clears it, so the agent's earlier edits end up in no history entry and cannot be undone.
The user presses Cmd+Z mid-turn or mid-drag. The in-flight edits are wiped and the commit records a bogus agentTurn command.
Every user command during an agent turn is folded into the agent's single undo entry (from reading).
Evidence:test/review_probes/engine_command_engine_probe.dart (local, untracked), engine level. No UI guard blocking undo or canvas input during an agent turn was found, but not every input path was traced.
Fix sketch: make transactions a stack or refuse a nested begin, refuse or queue undo/redo while one is open, and do not hold a transaction across awaits (snapshot per tool call and merge at the end). Related: #54.
From the engineering review on 2026-10-13.
In `lib/history/command_engine.dart`: `executeKind` swallows commands while a transaction is open (line 130), `beginTransaction` overwrites the pending snapshot (line 182), and `undoOwnLatest` has no transaction guard. `lib/agent/agent_controller.dart` (around line 440) holds a transaction open across the awaits of a whole agent turn.
**Scenarios:**
- The agent is mid-turn and the user drags a node. The drag's begin overwrites the agent's snapshot and its commit clears it, so the agent's earlier edits end up in no history entry and cannot be undone.
- The user presses Cmd+Z mid-turn or mid-drag. The in-flight edits are wiped and the commit records a bogus `agentTurn` command.
- Every user command during an agent turn is folded into the agent's single undo entry (from reading).
**Evidence:** `test/review_probes/engine_command_engine_probe.dart` (local, untracked), engine level. No UI guard blocking undo or canvas input during an agent turn was found, but not every input path was traced.
**Fix sketch:** make transactions a stack or refuse a nested begin, refuse or queue undo/redo while one is open, and do not hold a transaction across awaits (snapshot per tool call and merge at the end). Related: #54.
ImBenji
added the bug label 2026-10-13 02:28:38 +00:00
ImBenji
added this to the Arcs & Angles project 2026-10-13 02:28:38 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
From the engineering review on 2026-10-13.
In
lib/history/command_engine.dart:executeKindswallows commands while a transaction is open (line 130),beginTransactionoverwrites the pending snapshot (line 182), andundoOwnLatesthas no transaction guard.lib/agent/agent_controller.dart(around line 440) holds a transaction open across the awaits of a whole agent turn.Scenarios:
agentTurncommand.Evidence:
test/review_probes/engine_command_engine_probe.dart(local, untracked), engine level. No UI guard blocking undo or canvas input during an agent turn was found, but not every input path was traced.Fix sketch: make transactions a stack or refuse a nested begin, refuse or queue undo/redo while one is open, and do not hold a transaction across awaits (snapshot per tool call and merge at the end). Related: #54.