fix(platform): ensure cache invalidation before automation list refresh#1116
Conversation
Await queryClient.invalidateQueries() before dispatching the workflow-updated window event. This prevents the automations table from refetching stale data before TanStack Query's cache is properly invalidated, fixing the race condition where newly created automations would not appear in the list. Closes #1112
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR exports the Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
✨ 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 |
Summary
window.dispatchEvent('workflow-updated')fired before TanStack Query cache invalidation completed, causing the automations table to refetch stale datauseInvalidateWorkflowsand explicitly awaits cache invalidation in both the blank automation creation dialog and the template installation grid before dispatching the refresh eventTest plan
Summary by CodeRabbit