Skip to content

Conversation

@midigofrank
Copy link
Collaborator

Description

Add Y.js UndoManager integration to enable undo/redo functionality in the collaborative workflow editor. The implementation includes:

  • Initialize UndoManager tracking all workflow collections (jobs, triggers, edges, positions)
  • Add undo/redo commands to WorkflowStore with canUndo/canRedo state tracking
  • Wire up keyboard shortcuts (Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z, Cmd/Ctrl+Y)
  • Add undo/redo control buttons to WorkflowDiagram with enabled/disabled states
  • Integrate UndoManager event listeners to keep UI state in sync with history stacks
  • Add comprehensive unit tests for undo/redo state management

Closes #3712

Validation steps

  1. Open the collab editor
  2. Make some changes
  3. Try to click on the undo button or redo
  4. If there no changes to undo, the button is disabled

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Pre-submission checklist

  • I have performed a self-review of my code.
  • I have implemented and tested all related authorization policies. (e.g., :owner, :admin, :editor, :viewer)
  • I have updated the changelog.
  • I have ticked a box in "AI usage" in this PR

Add Y.js UndoManager integration to enable undo/redo functionality in the collaborative workflow editor. The implementation includes:

- Initialize UndoManager tracking all workflow collections (jobs, triggers, edges, positions)
- Add undo/redo commands to WorkflowStore with canUndo/canRedo state tracking
- Wire up keyboard shortcuts (Cmd/Ctrl+Z, Cmd/Ctrl+Shift+Z, Cmd/Ctrl+Y)
- Add undo/redo control buttons to WorkflowDiagram with enabled/disabled states
- Integrate UndoManager event listeners to keep UI state in sync with history stacks
- Add comprehensive unit tests for undo/redo state management
@github-project-automation github-project-automation bot moved this to New Issues in v2 Nov 12, 2025
@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.64%. Comparing base (fcb972a) to head (cd959c4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3967      +/-   ##
==========================================
- Coverage   88.67%   88.64%   -0.03%     
==========================================
  Files         423      423              
  Lines       18926    18926              
==========================================
- Hits        16782    16777       -5     
- Misses       2144     2149       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@midigofrank midigofrank self-assigned this Nov 12, 2025
@midigofrank midigofrank marked this pull request as ready for review November 12, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New Issues

Development

Successfully merging this pull request may close these issues.

Implement undo/redo functionality for workflow canvas

2 participants