alexandrusoare opened a new pull request, #37807: URL: https://github.com/apache/superset/pull/37807
### SUMMARY When users create tabs or move components in dashboard edit mode, the `parents` array on layout items was not being updated. The `parents` array tracks the ancestry chain of each component (e.g., a chart inside a tab would have `parents: ["ROOT_ID", "TABS_ID", "TAB_ID"]`). The `updateComponentParentsList` function that rebuilds these arrays was only called when **saving** the dashboard (via `saveDashboardRequest`). This meant: 1. User creates tabs → visual layout updates correctly 2. User opens filter editor → scoping tree reads stale `parents` arrays 3. Scoping tree shows incorrect hierarchy (charts not under tabs) 4. User refreshes page → saved data loads with correct `parents` → works correctly ## Solution Call `updateComponentParentsList` in the main `layoutReducer` function after any layout action that modifies the state. This ensures `parents` arrays are always up-to-date immediately after any layout change. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> ### TESTING INSTRUCTIONS 1. Created a new dashboard with charts 2. Edited dashboard and created tabs 3. Moved charts into tabs 4. Opened filter editor → Scoping tab 5. Verified tree shows correct tab hierarchy immediately (without refresh) ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [ ] 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]
