aminghadersohi opened a new pull request, #44152: URL: https://github.com/apache/superset/pull/44152
### SUMMARY Completes MCP Treemap support on top of the merged community implementation in #43569, without replacing its plugin or chart-type registration. - Match the frontend's bounded metric/hierarchy ordering, including hierarchy tie-breakers when metric sorting is disabled. - Accept bounded native hierarchy and saved/SIMPLE/SQL metrics alongside canonical typed references. Expose Treemap presentation controls. - Preserve omitted controls in saved and cached updates, support explicit clears and partial updates, and restrict dataset rebind inheritance to presentation controls. - Replace generic bar/scatter previews with bounded metric-proportional, hierarchical slice-and-dice rectangles, labels, categorical colors and tooltips. Unsupported representations return structured errors; Explore remains the native ECharts renderer. - Validate hierarchy outputs, metric aliases, finite numeric results and query-error envelopes across generation, compilation, previews, chart data and exports. - Add request/registered FastMCP, cache, update/rebind, cross-chart and rendered Vega regressions. Tracking: [SC-120298](https://app.shortcut.com/preset/story/120298). Base implementation: [#43569](https://github.com/apache/superset/pull/43569), merged as `1b03ad89fb7a27c36cc9c266d755a6eaf90bb0a4`. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Before: Treemap previews could return generic scatter/bar geometry, and updates reset omitted controls. After: previews contain explicit nested rectangles sized by metric values, with hierarchy-path tooltips. The renderer regression checks scenegraph areas and bounds, not snapshots. The bounded Vega-Lite layout is intentionally identified as slice-and-dice, not native ECharts; Explore provides native formatting and interactions. ### TESTING INSTRUCTIONS 1. Use `generate_chart` or `generate_explore_link` with `chart_type: "treemap_v2"`, two hierarchy columns and a saved/SIMPLE/SQL metric. 2. Set `row_limit: 1` and toggle `sort_by_metric`; inspect metric-descending/hierarchy-ascending query ordering. 3. Preview saved and unsaved `form_data_key` states as ASCII, table and Vega-Lite. Inspect hierarchy, tile areas, labels and tooltips. 4. Set nondefault colors, row limit, sorting, labels and formats. Update only one control through `update_chart` and `update_chart_preview`; confirm other controls survive. Verify nullable/empty clears and dataset rebind behavior. 5. Return an invalid metric, missing hierarchy output or query error; confirm generation/preview/data/export returns a structured failure. Validation results will be updated with the final local suite and exact-head GitHub checks. Eight focused probes failed on the merged baseline and passed after this change. Live database/browser validation is not available in this worktree; query execution and persistence are mocked in the product-path unit tests. ### ADDITIONAL INFORMATION - [x] Has associated issue: [SC-120298](https://app.shortcut.com/preset/story/120298) - [x] Required feature flags: existing MCP service configuration - [ ] 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 - [x] 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]
