durgaprasadml opened a new pull request, #40777: URL: https://github.com/apache/superset/pull/40777
## Summary Fix unstable dashboard theme/color scheme behavior introduced in Superset 6.0.0, especially affecting embedded dashboards and guest-token iframe environments. This PR improves theme consistency by ensuring explicit SDK theme overrides are respected, preventing stale cached theme data, and adding more reliable theme fetching behavior for embedded use cases. ## Changes ### Frontend - Prevent nested ThemeProvider instances from overriding explicit SDK theme configuration - Improve embedded dashboard theme precedence behavior - Add guest-token aware fallback handling for theme fetching ### Backend - Add automatic cache invalidation for cached bootstrap/theme data on Theme model create/update/delete - Prevent stale dashboard theme rendering caused by cached bootstrap responses ### Testing - Added frontend regression coverage - Added backend cache invalidation tests - Updated assertions for dynamic options handling ## Validation Verified successfully with: - Frontend Jest tests - Backend unit tests - pre-commit checks - plugins:build ## Problem After upgrading to Superset 6.0.0, embedded dashboards could inconsistently apply dashboard color schemes/themes, especially: - inside iframes - with guest token authentication - after theme updates - when nested providers overrode explicit SDK settings This resulted in unstable or stale theme rendering behavior. ## Root Cause The issue was caused by a combination of: - nested theme providers shadowing explicit embedded SDK overrides - cached bootstrap theme data not being invalidated after theme updates - unreliable theme fetch behavior in guest-token environments ## Related Issue Fixes #40754 -- 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]
