EnxDev opened a new pull request, #41999: URL: https://github.com/apache/superset/pull/41999
### SUMMARY Deleting a Display Control (chart customization) on a dashboard that also has a dashboard filter reported success, but the control reappeared as soon as the user clicked **Apply Filters**. **Root cause:** A Display Control keeps a "pending" value change in `dashboardInfo.pendingChartCustomizations`. On Apply, the filter bar re-saves every pending item as a config *modification* (`saveChartCustomization(pendingItems, [])`), and the backend's `update_chart_customizations_config` **appends any `modified` id it doesn't recognize**. So a just-deleted control was re-created. The delete itself was correct (backend returned `[]`); the resurrection came entirely from the Apply re-save racing the in-flight delete. **Fix (2 files):** 1. `useFilterConfigModal` — `await` the customization save so the delete is committed before the config modal closes, making the config authoritative. 2. `FilterBar` — on Apply, skip pending items that are no longer in the config, so a deleted control is never re-persisted. Adds a Playwright regression test that seeds a dashboard with a dashboard filter and a Display Control, deletes the control, applies, and asserts it stays gone. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF - Before [delete-display-control-BEFORE.webm](https://github.com/user-attachments/assets/6e438a47-6ef3-4172-9925-fdde09830572) - After [delete-display-control-AFTER.webm](https://github.com/user-attachments/assets/4bea071a-72b7-438b-a598-7ea8f2fd4aa4) ### TESTING INSTRUCTIONS 1. Open a dashboard with at least one dashboard filter (e.g. a Value filter) and at least one Display Control (e.g. Time grain). 2. Open **Add or edit filters and controls**, delete the Display Control, and save. 3. Click **Apply Filters**. 4. The deleted Display Control should **not** reappear. Automated: `npm run playwright:test -- tests/dashboard/delete-display-control.spec.ts` ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
