fix(dashboard): abort previous chart queries when filters change to p…#36092
fix(dashboard): abort previous chart queries when filters change to p…#36092richardfogaca wants to merge 2 commits intoapache:masterfrom
Conversation
…revent stale data rendering
Code Review Agent Run #ffff65Actionable 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 |
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| State mutation in Redux reducer ▹ view | ||
| State mutation in Redux reducer ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/src/components/Chart/chartReducer.ts | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
…revent stale data rendering
SUMMARY
Fixes cross-filter persistence bug where removing filters before charts finish loading leaves charts displaying stale
filtered data despite filters being cleared from the UI.
Root Cause: The
CHART_UPDATE_STARTEDreducer replaces the previous query'sAbortControllerwithout calling.abort(), allowing in-flight requests to complete with outdated filter values.The Fix: Abort previous
AbortControllerbefore replacing it (3-line change), matching the pattern already usedfor annotation queries.
Impact:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE:

In this case "Planes" was the cross-filter selected and then removed, but the charts did not rehydrate back:
AFTER:

No filters are applied when cross-filter is cleared:
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION