codeant-ai-for-open-source[bot] commented on PR #38402:
URL: https://github.com/apache/superset/pull/38402#issuecomment-4054528334

   ## **Sequence Diagram**
   
   This PR adds a new handlebars chart type path in MCP so requests with custom 
HTML templates can be validated and converted into Superset form data. The core 
change is mode-aware handling for raw versus aggregate queries before chart 
creation or explore link generation.
   
   ```mermaid
   sequenceDiagram
       participant User
       participant MCP Service
       participant Schema Validator
       participant Chart Utils
       participant Superset Backend
   
       User->>MCP Service: Send chart request with chart_type handlebars
       MCP Service->>Schema Validator: Pre validate template and query mode
       Schema Validator-->>MCP Service: Return validated handlebars config
       MCP Service->>Chart Utils: Map config to form data
   
       alt query mode raw
           Chart Utils->>Chart Utils: Map selected columns for raw rows
       else query mode aggregate
           Chart Utils->>Chart Utils: Map metrics and optional groupby
       end
   
       Chart Utils-->>MCP Service: Return handlebars form data
       MCP Service->>Superset Backend: Create chart or generate explore result
       Superset Backend-->>User: Return chart response
   ```
   
   ---
   *Generated by [CodeAnt AI](https://codeant.ai)*
   


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