fix(dashboard): Workflow runs loading state usage page#9868
Conversation
… data source Each chart now receives loading state for its specific data request: - Trends charts (DeliveryTrendsChart, InteractionTrendChart, ActiveSubscribersTrendChart, ProvidersByVolume) use isTrendsLoading - Workflow charts (WorkflowsByVolume, WorkflowRunsTrendChart) use isWorkflowLoading This prevents charts from showing loading skeletons when their data is already loaded but other requests are still pending. Co-authored-by: dima <dima@novu.co>
|
Cursor Agent can help with this pull request. Just |
✅ Deploy preview added
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hey there and thank you for opening this pull request! 👋 We require pull request titles to follow specific formatting rules and it looks like your proposed title needs to be adjusted. Your PR title is: Requirements:
Expected format: Details: PR title must end with 'fixes TICKET-ID' (e.g., 'fixes NOV-123') or include ticket ID in branch name |
WalkthroughThis change refactors the analytics dashboard to replace centralized loading and error state handling with granular per-chart loading and error tracking. The 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
What changed? Why was the change needed?
This PR addresses an issue on the Usage/Analytics page where charts displayed loading skeletons longer than necessary. In the previous PR (#9854), data fetching was split into multiple queries, but all charts continued to use a single, combined loading state. This meant charts would wait for all queries to resolve before rendering, even if their specific data was already available.
The change refactors the
ChartsSectionand individual chart components to use distinct loading states (isTrendsLoading,isWorkflowLoading) and error objects (trendsError,workflowError) based on the data each chart consumes. This ensures that charts render immediately once their specific data has loaded, improving perceived performance.Screenshots
Slack Thread