Skip to content

feat: Implement undo / redo stack and component API #318

Description

@handreyrc

Description

Implement undo / redo capabilities to manage model changes in the store and expose an API to interact with it.

Motivation

This is the foundation for the "Edit then Save" pattern. It can be quite inconvenient if changes cannot be rolled back as the user edits tasks.

Proposed Implementation

  • Implement a stack of model states as the model changes
  • Limit the size of the stack (number of undo / redo operations supported)
  • Handle states coming in and out as the stack reaches its size limit
  • Handle fork, when the user undoes to a certain state in the stack and from that point a new state is created
    • The states out of the fork sequence must be removed.
  • Implement API to call undo / redo

Definition of Done

  • Implementation: Fully implemented according to the Open Workflow spec.
  • Unit Tests: Comprehensive unit tests are included and passing.
  • Integration Tests: Verified within the monorepo and target environments (Web/VS Code).
  • Documentation: Updated README.md, ADRs, or official docs.
  • Performance: No significant regression in editor responsiveness.
  • Accessibility: UI changes comply with accessibility standards.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions