mikebridge opened a new pull request, #45641: URL: https://github.com/apache/superset/pull/45641
### SUMMARY TL;DR: Keep activity visible, but only offer version actions when the save has a snapshot to load. A membership-only save can record that a chart was added to a dashboard without creating a dashboard version row. The activity response derived a version UUID anyway, so previewing that save requested a missing snapshot and returned 404. Carry the snapshot's creation transaction through the existing batched historical lookup, and only emit a version UUID when it matches the activity transaction for that entity. This adds no SQL queries and applies to chart and dataset activity too. It does not change snapshot capture or restore semantics. The existing nullable response and frontend guards handle activity without a snapshot. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Before: a membership-only save could lead to “Failed to load version preview.” After: the activity stays in history, without version actions for a nonexistent snapshot. Ordinary captured versions remain previewable. No visual layout change. ### TESTING INSTRUCTIONS 1. Create a dashboard with a chart and save a title edit. 2. Add another chart through the chart's dashboard membership or through the dashboard's chart collection, without changing dashboard scalar properties. 3. Open version history. The membership-only activity remains visible but does not start a preview; the earlier title edit can still be previewed. Automated coverage includes native SQLite capture in both membership directions, a chart snapshot identity check, and the existing null-version frontend guards. The two membership regressions failed before the fix. Focused backend: 182 passed. Frontend: 59 passed across four suites. Changed-file pre-commit hooks passed, including MyPy and frontend type checking. Full unit suite: 29,810 passed, 56 skipped, 5 xfailed, with two pre-existing ARM long-double failures (`dataframe_test::test_df_to_records_preserves_finite_longdouble_and_nulls_nonfinite` and `common/test_query_context_processor::test_get_data_json_preserves_browser_numeric_contract`). ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [x] Required feature flags: `VERSION_HISTORY`; capture enabled for reproduction - [x] 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]
