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

   ### SUMMARY
   The dashboard version-history rollup entry `Dataset used by N charts 
updated: [dataset]` is designed (R283 TC-09) to list the affected chart names 
in a hover tooltip. QA (SC-118368 TC-040) found the tooltip renders nothing: 
the backend `impact` payload on the related activity record carried only 
`{"charts": N}` — no ids or names — so the frontend had nothing to build the 
tooltip from.
   
   The batched impact query (`superset/versioning/activity/impact.py`) already 
collected the matching chart version rows per `(dataset_id, transaction_id)` 
pair and reduced them to a count. This PR carries the detail through instead of 
discarding it:
   
   - `batch_chart_counts` → **`batch_chart_impacts`**: the same single batched 
SELECT now also pulls `slice_name`, and each pair maps to `[{"id", "name"}, …]` 
sorted case-insensitively by name (the name is the chart's name **at that 
transaction**, from the matched version row — historical entries keep reading 
as they did when the change happened).
   - `impact_for_record` emits `{"charts": N, "chart_names": [...]}`; empty 
stays `None` (no impact field on the wire), and the path/kind gating is 
unchanged.
   - `ActivityImpactSchema` gains a nested `ActivityImpactChartSchema` (`id` + 
`name`) and documentation.
   - Frontend: the `ActivityRecord` impact type is extended, and 
`RelatedUpdateRow` wraps the impact-aware headline in the same `Tooltip` 
pattern the rolled-up-names branch already uses (per-chart `<div>` rows, 
`Untitled` fallback).
   
   No migrations; the payload change is additive (older frontends ignore the 
new field, and `chart_names` is optional for older backends).
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before (QA evidence on the ticket): hovering the rollup entry shows no 
tooltip — the DOM tooltip query returned `[]`. After: hovering lists the 
affected chart names, one per row.
   
   ### TESTING INSTRUCTIONS
   1. `pytest tests/unit_tests/versioning` — includes new tests that 
`impact_for_record` emits the names and that the decorated wire record's 
`impact` carries `{"charts": N, "chart_names": [...]}`. Control: reverting the 
`superset/` changes fails the new payload tests.
   2. `npm run test -- src/features/versionHistory` — includes new 
`RelatedUpdateRow` tests: tooltip lists the names on hover, empty names render 
as `Untitled`, and records without impact names show no tooltip.
   3. Manual: with versioning capture on, edit a dataset used by ≥2 charts on a 
dashboard, open the dashboard's version history, hover `Dataset used by N 
charts updated: …` → the affected chart names appear.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: SC-119775 (Preset Shortcut, QA of SC-118368 
TC-040)
   - [ ] Required feature flags:
   - [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
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01JRLEJS4mUqKBoPjSjviKUW
   


-- 
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