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

     ### SUMMARY
   
   Introduces a **backend-owned JSON Schema control system** for Dashboard V2 
data widgets, and completes the **"block/building-block" → "widget"** rename 
across the dashboard-v2 framework and the `@apache-superset/core` dashboard 
namespace.
   
   The same backend schema now drives two consumers from one source of truth:
   - the Inspector's control panel (rendered generically with JSONForms), and
   - read-only MCP tools for AI agents, via **progressive schema disclosure**.
   
   **Progressive disclosure.** A single MCP tool, `get_widget_control_schema`, 
returns a *minimum-viable* root by default (mandatory fields expanded to their 
leaves, cheap optional leaves inline) and collapses nested/optional branches to 
opaque drill-in markers (`x-collapsed` + `x-path`). Passing `paths` expands 
just those branches (batchable), so an agent never has to load an entire schema 
up front. Markers keep a terse description (so the agent knows what's behind 
them) and are flagged `x-dynamic` when their shape depends on the live query.
   
   Charts are treated as just another **widget** (query + visualize 
capability); a ported **balloons** chart is included as the demo widget.
   
   Notable changes:
   - **Progressive schema disclosure** — `superset/widgets/` (registry, 
Pydantic controls, `schema_tools`), REST `WidgetControlsRestApi`, and MCP 
discovery tools (`list_widget_types`, `get_widget_control_schema`).
   - **Rename to "widget"** across the dashboard-v2 framework and 
`@apache-superset/core`.
   - Schema-driven Inspector control panel (JSONForms) + ported balloons widget.
   
   > [!NOTE]
   > This also requires companion changes to **Michael's chat extension** 
(`superset-extensions/chat`) so its client tools consume the new 
schema-drivendiscovery tools instead of hand-maintained schemas.
   
   ### SCREENSHOT
   
   <img width="1692" height="940" alt="image" 
src="https://github.com/user-attachments/assets/e7fe0659-2ea6-477d-b7c4-293539e21f6e";
 />
   
   ### TESTING INSTRUCTIONS
   
   1. Open Dashboard Builder V2, drop a **balloons** widget, and set a dataset, 
metric, and grouping dimension in the Inspector — the control panel is driven 
by the backend schema.
   2. Via chat: "build a balloon chart of genders over sum__num", then "make 
girls balloons pink and boys black" — the agent discovers the schema 
progressively (root → drill into `customize`) and edits only the requested 
fields.
   3. Backend unit tests: `pytest tests/unit_tests/widgets 
tests/unit_tests/mcp_service/widgets`
   


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