YuriyKrasilnikov opened a new pull request, #37367: URL: https://github.com/apache/superset/pull/37367
### SUMMARY Initialize feature flags in embedded mode entry point. Currently `embedded/index.tsx` calls `getBootstrapData()` which loads `feature_flags`, but never calls `initFeatureFlags()` to populate `window.featureFlags`. This causes console errors when any component calls `isFeatureEnabled()`. **Root cause:** Missing `initFeatureFlags()` call in `embedded/index.tsx` **Reference:** `preamble.ts:81` correctly initializes feature flags This change: - Extracts feature flags initialization into `setupEmbedded.ts` for better testability - Adds unit tests for the initialization logic - Calls `setupEmbedded()` after `getBootstrapData()` in embedded entry point ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF **BEFORE:** Console shows "Failed to query feature flag ENABLE_JAVASCRIPT_CONTROLS" errors **AFTER:** No console errors ### TESTING INSTRUCTIONS 1. Create embedded dashboard with guest token 2. Open in iframe 3. Open browser console (F12) 4. **BEFORE:** Multiple "Failed to query feature flag" errors 5. **AFTER:** No errors ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #37310 - [ ] Required feature flags: N/A - [ ] Changes UI: No - [ ] Includes DB Migration: No - [ ] Introduces new feature or API: No - [ ] Removes existing feature or API: No -- 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]
