codeant-ai-for-open-source[bot] commented on PR #38531:
URL: https://github.com/apache/superset/pull/38531#issuecomment-4054186478
## **Sequence Diagram**
This PR adds optional extra form data to chart data requests so dashboard
native filters can be applied in MCP calls. The flow now merges these filters
into form data for all query context construction paths, ensuring filtered
results are returned consistently.
```mermaid
sequenceDiagram
participant Client
participant MCPChartTool
participant ChartConfig
participant FilterMerge
participant QueryEngine
Client->>MCPChartTool: Request chart data with optional extra form data
MCPChartTool->>ChartConfig: Load chart state from cache or saved chart
alt Cached or fallback form data path
MCPChartTool->>FilterMerge: Merge extra form data into form data
FilterMerge-->>MCPChartTool: Form data enriched with adhoc filters
MCPChartTool->>QueryEngine: Build query context with filters and
adhoc filters
else Saved query context path
MCPChartTool->>FilterMerge: Merge extra form data into saved form
data
FilterMerge-->>MCPChartTool: Updated query context form data
MCPChartTool->>QueryEngine: Load query context and apply overrides
end
QueryEngine-->>MCPChartTool: Execute query and return chart result
MCPChartTool-->>Client: Return filtered chart data
```
---
*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]