You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once a block throws, BlockErrorBoundary keeps showing the error for that node id, even after the agent fixes or replaces the block. The message even picks up the new type, e.g. "This sequence block could not be rendered: Cannot read properties of undefined (reading 'from')", even though the error came from the old flow diagram.
Give BlockErrorBoundary the same reset, keyed on the block (e.g. pass block or a content revision and clear error in getDerivedStateFromProps when it changes), or key the boundary on the block's type + revision.
Once a block throws,
BlockErrorBoundarykeeps showing the error for that node id, even after the agent fixes or replaces the block. The message even picks up the new type, e.g. "This sequence block could not be rendered: Cannot read properties of undefined (reading 'from')", even though the error came from the old flow diagram.Repro (Whiteboard Desktop 0.1.1, via MCP)
Cannot read properties of undefined (reading 'from')after an edge is removed #608.session_edit{"type":"replace","targetId":"<same block id>","content":{"type":"sequence","title":"Repro sequence","actors":{"a":"A","b":"B"},"steps":[{"from":"a","to":"b","label":"call","explanation":"A calls B."}]}}Cause
BlockErrorBoundarysetserroringetDerivedStateFromErrorand never clears it (blocks.tsx#L282-L309).DocumentNodeis keyed bynode.id(api-document.tsx#L343-L344) andreplacekeeps the id, so the same boundary instance survives the edit (api-document.tsx#L408-L419).ReviewDocumentBoundaryalready handles this by resetting whenrevisionchanges (review-document-boundary.tsx#L36-L44).Possible fix
Give
BlockErrorBoundarythe same reset, keyed on the block (e.g. passblockor a content revision and clearerroringetDerivedStateFromPropswhen it changes), or key the boundary on the block's type + revision.