- Patch app.loadGraphData to dispatch custom event after loading, ensuring workflow handlers fire when switching active workflow - Add document-click handler to catch workflow changes initiated by clicks - Pass event options through removeEventListener for proper cleanup - Detect possible pending graph switch on document-click and reduce max refresh attempts from 8 to 3 to avoid stale graph timers