deepujain opened a new pull request, #45764:
URL: https://github.com/apache/superset/pull/45764

   ### SUMMARY
   
   When returning to a dashboard with tabs, selected filters can remain visible 
while charts ignore them. Dashboard hydration can restore outdated chart and 
tab lists, and the container previously compared its calculated scope only with 
its last dispatch. It now also checks the scopes in the current store, so 
restored selections reach chart queries within the configured scope.
   
   Prior work: #44405 repairs parent chains written by MCP tools, and #40470 
fixes required-filter defaults. The stale-store check follows 
[PRad712/superset#8](https://github.com/PRad712/superset/pull/8), which was 
merged into that fork. This change brings that correction upstream and tests 
the hydration payload through chart query form-data generation.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable. There are no changes to the layout or controls.
   
   ### TESTING INSTRUCTIONS
   
   1. Open a dashboard with multiple tabs, apply a native filter, navigate 
away, and return with the selected value restored.
   2. Confirm that charts in the filter's scope still reflect that value. 
Charts outside its scope should remain unaffected.
   
   The two new regression cases fail against unmodified production code on Node 
v24.16.0: hydration leaves stale chart or tab IDs in the store. With the fix, 
they verify that the selected value survives hydration, reaches the scoped 
chart's query form data, stays out of the other tab's chart, and causes only 
one corrective scope dispatch.
   
   From `superset-frontend`, run:
   
   ```sh
   npm run test -- --runInBand --watchman=false 
src/dashboard/components/DashboardBuilder/DashboardContainer.test.tsx 
src/dashboard/reducers/nativeFilters.test.ts 
src/dashboard/util/getFormDataWithExtraFilters.test.ts 
src/dashboard/util/getChartIdsInFilterScope.test.ts
   ```
   
   Validation on Node v24.16.0: all 107 tests passed across the four suites 
above. The workspace package build (`npm run plugins:build`) and staged 
`pre-commit run`, including TypeScript checking, also passed.
   
   Live browser navigation and a rendered documentation preview were not run 
here.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: Fixes #40704
   - [ ] 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]

Reply via email to