mikebridge opened a new pull request, #45052: URL: https://github.com/apache/superset/pull/45052
### SUMMARY Follow-up to #44455. Dashboard charts on a semantic view decide whether a saved time grain is still valid by consulting the dashboard's semantic metadata. That metadata was captured once at page load, so after editing the dashboard it could be stale, and a saved grain could be kept or dropped based on outdated information. - Page load, adding a semantic chart, and saving the dashboard now all publish to one dashboard-scoped Redux snapshot of semantic metadata. - Adding a semantic chart fetches fresh source metadata even when the datasource cache already has a row for it. The provider identifier is normalized only after its numeric ID and type match the chart's source key. - Saving fetches the dashboard's datasets independently of `json_metadata` and invalidates the previous snapshot until the response arrives. - Metadata that is unknown, failed to load, omitted, or mismatched is treated as unproven, so the saved grain is retained rather than cleared. - Request IDs and generations guard against stale responses, save/add races, independent adds, same-dashboard remounts, and overlap between page load and add. Late page-load data can still supply sources that are unaffected. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A (frontend state handling, no visual change). ### TESTING INSTRUCTIONS Run the focused Jest suites under `superset-frontend/src/dashboard`: `actions/dashboardState.test.ts`, `actions/datasources.test.ts`, `containers/DashboardPage.test.tsx`, and `reducers/dashboardInfo.test.ts` (131 tests pass, 1 skipped). They cover provider identifier rejection, independent adds, navigation and remounts, save/add and failed-fetch interleavings, stale versus fresh page responses, and page-load/add overlap. Changed-file pre-commit hooks, including type checking, pass. These are mocked frontend tests. No live dashboard or semantic provider was exercised. ### ADDITIONAL INFORMATION - [ ] Has associated issue - [ ] Required feature flags - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
