improvement: preserve undo history after MCP tool execution#708
improvement: preserve undo history after MCP tool execution#708breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom improvement/preserve-undo-history-on-mcp-applybreaking-brake/cc-wf-studio:improvement/preserve-undo-history-on-mcp-applyCopy head branch name to clipboard
Conversation
- Added clearHistory option to setActiveWorkflow (default: true) - Pass clearHistory: false in MCP apply and Slack import paths - Workflow file open still clears history as before Closes #707 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughModified Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🎉 This PR is included in version 3.32.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Preserve undo/redo history when
update_nodesorapply_workflowMCP tools modify the canvas.Closes #707
What Changed
setActiveWorkflow()always calledtemporal.clear()to prevent cross-workflow undo. This was correct when opening a different workflow file, but when called from MCP apply paths, it wiped the undo entry thatsetCanvas()just created.Before
After
Changes
src/webview/src/stores/workflow-store.ts- Addedoptions?: { clearHistory?: boolean }parameter tosetActiveWorkflow(default:truefor backward compatibility)src/webview/src/App.tsx- Pass{ clearHistory: false }in MCP apply (2 paths) and Slack importTesting
npm run format && npm run lint && npm run build)🤖 Generated with Claude Code
Summary by CodeRabbit