openpencil/apps/web/src
Fini 4724d5be2c test(ai): undo/redo × element-tool dispatch integration (8 cases)
Verifies the user-visible history contract the dispatcher owes:

1. One batch dispatch = exactly ONE undo entry (even for 8 tools).
   No Ctrl-Z spam to reverse one AI turn.
2. Separate dispatches = separate undo entries. The batch window
   closes at endBatch; subsequent dispatches don't piggyback.
3. Undo reverts the whole batch atomically (all tools snap back).
4. Undo → redo restores the whole batch atomically.
5. All-unsupported batch creates ZERO undo entries — endBatch's
   "no changes" short-circuit prevents ghost undos that would jump
   the UI between identical states.
6. Mixed valid+unsupported batch → 1 undo entry for the valid ones.

Complements element-tools-dispatcher.test.ts (which spies on
startBatch/endBatch) by exercising the actual history-store round-
trip and asserting stack length deltas.
2026-04-22 01:54:06 +08:00
..
__tests__ V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
canvas fix(canvas): require explicit role:'overlay' for layout-flow escape hatch 2026-04-16 21:07:40 +08:00
components feat(ai): detect sibling overlaps in snapshot_layout and guide fixes 2026-04-16 21:07:29 +08:00
constants V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
hooks V0.7.3 (#111) 2026-04-15 22:19:12 +08:00
i18n V0.7.1 (#102) 2026-04-13 21:30:23 +08:00
lib V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
routes V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
services test(ai): undo/redo × element-tool dispatch integration (8 cases) 2026-04-22 01:54:06 +08:00
stores fix(core): design.md lives on PenDocument — kill cross-document leak 2026-04-20 00:37:31 +08:00
types V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
uikit V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
utils V0.7.3 (#111) 2026-04-15 22:19:12 +08:00
variables V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
router.tsx V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
routeTree.gen.ts V0.5.0 (#67) 2026-03-22 09:44:04 +08:00
styles.css V0.7.0 (#95) 2026-04-11 23:25:13 +08:00