Skip to content

fix(builder): block graph mutations during undo/restore PATCH - #45

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-fd25
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-management-fd25

Conversation

@cursor

@cursor cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

Bug

Undo and version restore PATCH the full workflow graph while isHistoryTransitioning is true, but canvas mutations (delete, connect, paste, etc.) were not gated. A concurrent edit could complete server-side and then be overwritten by the in-flight undo/restore PATCH.

Impact

Silent data loss — e.g. delete a node during undo, undo completes and resurrects the deleted node on the server.

Fix

  • Pass isHistoryTransitioning into graph mutation and clipboard hooks
  • Skip persist API calls while a history transition is in flight
  • Block destructive keyboard shortcuts during transition (undo/redo still allowed)

Validation

  • npx vitest run tests/components/use-builder-graph-mutations.test.ts
Open in Web View Automation 

Concurrent canvas edits while undo or version restore persists could race
the full-graph PATCH and overwrite newer server state with stale graphs.

Co-authored-by: esadrianno <esadrianno@gmail.com>
@vercel

vercel Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
v0-agent-kit Ready Ready Preview, v0 Aug 4, 2026 11:19am

This branch was successfully deployed

1 active deployment
Preview — e935bb05 Deployed Aug 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant