Skip to content

Add Designer transaction and undo/redo foundation - #94

Merged
ProGraMajster merged 2 commits into
masterfrom
codex/issue-33-designer-transactions-undo-redo
Aug 22, 2026
Merged

Add Designer transaction and undo/redo foundation#94
ProGraMajster merged 2 commits into
masterfrom
codex/issue-33-designer-transactions-undo-redo

Conversation

@ProGraMajster

Copy link
Copy Markdown
Owner

Summary

Adds the central Designer transaction and bounded undo/redo foundation for issue #33. The feature records typed model, property, layout, tree, rename, and selection changes per document; exposes Undo/Redo commands and toolbar state; integrates property-grid, collection-editor, outline, drag, resize, and root-layout mutations; and tracks the saved revision independently from the current history position.

Architecture

  • Per-document DesignerTransactionManager and DesignerHistory with typed reversible changes.
  • Explicit commit/rollback lifecycle, nested transaction merging, no-op suppression, replay suppression, configurable bounded retention, and save-marker invalidation when history branches or evicts the saved revision.
  • Focused mutation snapshots use granular changes for normal edits; document-wide layout capture is reserved for root resize operations.
  • Existing two-parameter DesignerSession construction remains compatible; new Designer APIs are additive and .mfdesign serialization is unchanged.

Designer integration

  • Undo/Redo commands, toolbar buttons, localized captions, availability state, and per-document history switching.
  • Atomic transactions across property-grid edits, collection editors, outline/tree operations, rename, drag/move/resize gestures, root layout changes, and document replacement.
  • Selection, dirty state, save/reopen, code generation, reverse-parser, Form, and UserControl behavior retain regression coverage.

Reliability

  • Partial mutation failures roll back atomically.
  • Observer failures cannot strand active transactions, corrupt undo/redo stacks, leave stale gesture capture, or prevent session cleanup.
  • Nested commit/rollback, reentrancy, save marker, history limits (1, 2, 500, and runtime changes), disposal, close, clear, eviction, and GC release paths have dedicated coverage.
  • Stress coverage performs 1,000 property edits, 40 resize operations, 1,039 Undo operations, and 1,039 Redo operations with an exact serialization snapshot.

Validation

  • Transaction-focused tests: 67/67.
  • Designer tests: 342/342.
  • Runtime/Designer parity suite (Add Designer/runtime layout parity test suite #42): 78/78.
  • ModernFormsNext.Testing suite (Add headless TestHost and application UI testing infrastructure #64): 46/46.
  • All tests: 1331/1331.
  • Full Debug build: 0 warnings, 0 errors.
  • Full Release build: 0 warnings, 0 errors.
  • Android backend tests: 72/72; Android backend and smoke-test builds passed.
  • Windows backend tests: 7/7.
  • Cross-platform sample tests: 16/16; Windows and Android builds passed.
  • VSIX Debug and Release builds validated the generated VSIX: 0 warnings, 0 errors.
  • Canonical DocFX metadata/site builds: 0 warnings, 0 errors.
  • Release documentation tests: 32/32; 4/4 local documentation archives validated against feature SHA 43313f4151bc9b25ad4a745fdd6fa6d2e7ec5ffd.
  • git diff --check: clean.

Automated validation does not claim a manual Visual Studio Designer UI session or Android emulator/device run.

Follow-ups

Issues #34, #35, #36, #37, #39, and #41 remain separate follow-ups and are not implemented by this PR. This PR supplies the transaction/history foundation they can integrate with without changing their current status or target.

Closes #33

- centralize Designer mutations in atomic transactions
- add deterministic undo/redo history with rollback and replay suppression
- coalesce drag and resize operations into single history entries
- integrate property, tree and collection edits with Designer history
- track saved revisions and restore dirty state through undo/redo
- add headless regression coverage for nested, complex and failure scenarios
- keep model, selection and history stacks consistent when observers throw

- complete gesture and session cleanup after post-rollback notifications

- expand nested, history-limit, save-marker and GC regression coverage
@ProGraMajster
ProGraMajster merged commit d4c17c8 into master Aug 22, 2026
1 check passed
@ProGraMajster
ProGraMajster deleted the codex/issue-33-designer-transactions-undo-redo branch August 22, 2026 16:32
@github-project-automation github-project-automation Bot moved this from Backlog to Done in ModernFormsNext Roadmap Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Add Designer undo/redo and transaction system

1 participant