fix(Tabs): prevent infinite rerenders with nested tabs#37018
Conversation
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
🎪 Showtime deployed environment on GHA for 45bb64d • Environment: http://18.236.111.15:8080 (admin/admin) |
Code Review Agent Run #998926Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Sequence DiagramThe PR changes tab refresh behavior so that when a tab becomes visible after a dashboard-level refresh, the Tab component triggers a lazy chart refresh (isLazyLoad=true) and guards duplicate handling to avoid updating global refresh state — preventing infinite rerenders with nested tabs. sequenceDiagram
participant Dashboard UI
participant Tab Component
participant Redux Dispatcher
participant Chart Refresher
Dashboard UI->>Tab Component: Tab becomes visible (renderType=RENDER_TAB_CONTENT)
Tab Component->>Tab Component: check lastRefreshTime > tabActivationTime && not handled
Tab Component->>Redux Dispatcher: dispatch onRefresh(chartIds, force=true, interval=0, dashboardId, isLazyLoad=true)
Redux Dispatcher->>Chart Refresher: refreshCharts(chartIds,...)
Chart Refresher-->>Redux Dispatcher: refresh complete
note right of Redux Dispatcher: because isLazyLoad=true, global ON_REFRESH and filters refresh are NOT dispatched
Generated by CodeAnt AI |
Nitpicks 🔍
|
|
CodeAnt AI finished reviewing your PR. |
|
🎪 Showtime deployed environment on GHA for 92e5cac • Environment: http://34.209.227.96:8080 (admin/admin) |
|
Bito Automatic Review Skipped – PR Already Merged |
(cherry picked from commit 0294c30)
(cherry picked from commit 0294c30)
SUMMARY
#35265 introduced a bug where refreshing a dashboard with nested tabs would cause infinite rerenders. This pr fixes that bug by introducing a lazy option to dashboard refresh action that doesn't update the global refresh time.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
tab-refresh-before.mp4
After:
tab-refresh-after.mp4
TESTING INSTRUCTIONS
This should not cause infinite rerenders.
ADDITIONAL INFORMATION