-
Notifications
You must be signed in to change notification settings - Fork 16.3k
fix(dashboard): prevent table chart infinite reload loop #36686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a critical infinite reload loop in dashboard table charts caused by the clientView property being continuously written to ownState. The fix strips clientView from ownState in the getRelevantDataMask selector, preventing Dashboard from seeing these changes as state updates that trigger re-queries.
Key changes:
- Modified
getRelevantDataMaskto stripclientViewfromownStateusing lodashomit - Added comprehensive unit tests in
activeAllDashboardFilters.test.tscovering the fix and edge cases - Added integration tests in
Dashboard.test.jsxverifying Dashboard behavior with ownDataCharts changes
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
superset-frontend/src/dashboard/util/activeAllDashboardFilters.ts |
Added logic to strip clientView from ownState in the getRelevantDataMask selector, preventing infinite reload loops |
superset-frontend/src/dashboard/util/activeAllDashboardFilters.test.ts |
Added 4 comprehensive test cases covering clientView stripping behavior, equality checks, and verifying other properties remain unchanged |
superset-frontend/src/dashboard/components/Dashboard.test.jsx |
Added 2 integration tests verifying Dashboard correctly handles ownDataCharts updates when clientView changes are filtered out |
The implementation correctly mirrors the existing pattern in ExploreViewContainer (lines 606 and 946) where clientView is already stripped. The fix is minimal, well-tested, and addresses the root cause at the selector level where Dashboard receives state updates.
|
🎪 Showtime deployed environment on GHA for 0770786 • Environment: http://35.92.7.123:8080 (admin/admin) |
0770786 to
b6e572c
Compare
|
🎪 Showtime deployed environment on GHA for b6e572c • Environment: http://54.218.182.98:8080 (admin/admin) |
Strip clientView from ownState in getRelevantDataMask to prevent infinite reload loops in dashboard context. TableChart writes clientView to ownState on every filtered-row change for export functionality, but clientView changes should NOT trigger chart re-queries. This matches the behavior already present in ExploreViewContainer which strips clientView before comparing ownState changes. Fixes #36595 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
b6e572c to
9e6d1c7
Compare
|
🎪 Showtime deployed environment on GHA for 9e6d1c7 • Environment: http://35.86.137.108:8080 (admin/admin) |
SUMMARY
Fixes an infinite reload loop in Dashboard context where table charts would continuously re-query, causing hundreds/thousands of API calls per user.
Root Cause: The recent "Export table data with Search box" feature (PR #36281) added clientView to ownState on every filtered-row change. In Dashboard context, getRelevantDataMask passed this through unchanged, causing Dashboard.jsx to see continuous state changes and trigger re-queries in an infinite loop.
Fix: Strip clientView from ownState in getRelevantDataMask (the selector that extracts chart state for Dashboard). This matches the existing pattern in ExploreViewContainer which already strips clientView before comparing state changes.
Why this location: clientView is explicitly for export functionality, not for triggering re-queries. Stripping at the selector level ensures Dashboard never sees these changes as state updates.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION